Semiprimonacci numbers, analogue of A078465
Maximilian Hasler
maximilian.hasler at gmail.com
Mon Jun 23 06:49:22 CEST 2008
On Sun, Jun 22, 2008 at 14:40, Jonathan Post <jvospost3 at gmail.com> wrote:
> Is this interesting to anyone but me?
> 1, 1, 1, 1, 1, 1, 3, 5, 5, 6, 7, 7, 13, 17, 18, 20, 30, 37, 47
> Semiprimonacci numbers:
> a(n)=a(n-4)+a(n-6)+a(n-9)+a(n-10)+a(n-14)+...+a(n-sp(k))+... until n >
> sp(k), where sp(k) is the k-th semprime = A001358(k);
> a(1)=a(2)=a(3)=1.
I'd say : maybe not during the "Summer Rules" period...? ;-)
Also, I think
a)
A078465 Primonacci numbers 1,1,1,2,2,4,...
is neither very natural concerning the name (the seq. has nothing in
common with Fibonacci numbers except for the values a(1) and a(2)),
nor natural for the start: why not a(0)=0, a(1)=1 (and then use the
general rule), like for Fibonacci?
Then it gives A023360: see below
b)
if you define a1=a2=a3 = 1 then a4 = 0 (we have to stop the sum before
n=4 since a0 is undefined (or =0 as in Fibonacci)) and your seq. would
go :
1, 1, 1, 0, 1, 1, 2, 1, 2, 2, 5, 4, 5, 4, 10, 11, 15, 12, 20, 24, 37,...
Fixing one more term=1 I get something closer to your seq., but still
not the same values:
1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 5, 5, 6, 7, 10, 13, 17, 18, 23, 30, 40, 47...
But wouldn't it be more natural to take a0=0, a1=1 and then use the rules ?
with this I get:
0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 3, 0, 2, 2, 6, 3, 6, 3, 11, 10, 16,
10, 23, 23, 40...
c)
I understand that your motivation is to transpose every existing seq.
definition using "primes" to the analogue using "semiprimes", but
(especially in this case) isn't this a bit arbitrary ? shouldnt it
then logically be done for any increasing sequence? (e.g., squares,
even/odd numbers (maybe the same), cubes, factorials, ...)
i.e. (highly unoptimized):
nonLinGenFib( d, a=[0,1] /*initial vals*/) = {
for( i = #a, d[ #d ], a=concat( a,0);
for( j=1, #d, if( d[j] + 1 >= #a, break);
a[#a] += a[ #a - d[j] ])); a }
nonLinGenFib(vector(10,i,prime(i)),[1,1])
/* this is "primonacci" */
[1, 1, 1, 2, 2, 4, 5, 8, 12, 16, 26, 36, 55, 81, 118, 177, ...]
nonLinGenFib(vector(10,i,prime(i)),[0,1])
/* this would be the natural version of "primo..." */
[0, 1, 0, 1, 1, 1, 3, 2, 6, 6, 10, 16, 20, 35, 46, 72, 105,...]
=A023360: Number of compositions of n into sums of primes.
nonLinGenFib([4,6,9,10,14,15,21],[0,1])
/* this would be the natural version of semiprimo...*/
[0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 3, 0, 2, 2, 6, 3, 6, 3, 11, 10,...]
I conjecture (i.e. don't want to write out the proof...) that this is
NEW SEQ: Number compositions of n into sums of semiprimes.
nonLinGenFib([4,6,9,10,14,15,21,22,25],[1,1])
/*the 1,1 version*/
[1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 4, 3, 2, 4, 8, 9, 9, 9, 14, 21, 26, 26,
33, 46, 63, 74]
nonLinGenFib([4,6,9,10,14,15,21,22,25],[1,1])
/*the 1,1,1 version*/
[1, 1, 1, 0, 1, 1, 2, 1, 2, 2, 5, 4, 5, 4, 10, 11, 15, 12, 20, 24, 37,
36, 49...]
nonLinGenFib([4,6,9,10,14,15,21,22,25,26,33],[1,1,1,1])
/*the 1,1,1,1 version : this should be yours */
[1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 5, 5, 6, 7, 10, 13, 17, 18, 23, 30, ...]
So I get other values , which I beleive correct. In order to get a 3
as first element >1 you have to impose 9 initial 1's, but then you get
a series of 4's after that 3.
nonLinGenFib(vector(5,i,i^2)) \\ "squaronacci"??
[0, 1, 1, 1, 1, 2, 3, 4, 5, 7, 11, 16, 22, 30, 43, 62, 88,...]
=A006456: Number of compositions of n into sums of squares.
nonLinGenFib(vector(5,i,i^3)) \\ "cubonacci"??
[0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 18, 23...]
= A023358 : Number of compositions into sums of cubes.
I conjecture that for any increasing seq. d of positive integers (i.e.
any set),
my nonLinGenFib() gives the Number of compositions of n into sums of
such numbers.
Maximilian
PS1: the following version allows to produce linear sequences by
appending a number of zeros to the vector of differences:
nonLinGenFib( d, a=[0,1] /*initial vals*/) = {
for( i = #a, max( vecmax(d), #d ), a=concat( a,0);
for( j=1, #d, if( d[j] + 1 >= #a || !d[j], break);
a[#a] += a[ #a - d[j] ])); a }
nonLinGenFib([1,2,0,0,0,0,0,0,0])
=> [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
PS2 [unrelated]: yes, of course, you found the correct author for the
Russian poem !
More information about the SeqFan
mailing list