Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a024312 -id:a024312
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = (Fibonacci numbers).
+10
20
0, 0, 1, 2, 3, 5, 8, 13, 26, 42, 68, 110, 178, 288, 466, 754, 1254, 2029, 3283, 5312, 8595, 13907, 22502, 36409, 58911, 95320, 154608, 250161, 404769, 654930, 1059699, 1714629, 2774328, 4488957, 7263285
OFFSET
1,4
LINKS
FORMULA
a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*Fibonacci(n-j+1). - G. C. Greubel, Jan 19 2022
MATHEMATICA
Table[t=0; m=3; p=BitShiftRight[n]; n--; While[n>p, t += Fibonacci[n+1]; n -= m++]; t, {n, 120}] (* G. C. Greubel, Jan 19 2022 *)
PROG
(Magma)
b:= func< n, j | IsIntegral((Sqrt(8*j+9) -3)/2) select Fibonacci(n-j+1) else 0 >;
A024318:= func< n | (&+[b(n, j): j in [1..Floor((n+1)/2)]]) >;
[A024318(n) : n in [1..80]]; // G. C. Greubel, Jan 19 2022
(Sage)
def b(n, j): return fibonacci(n-j+1) if ((sqrt(8*j+9) -3)/2).is_integer() else 0
def A024318(n): return sum( b(n, j) for j in (1..floor((n+1)/2)) )
[A024318(n) for n in (1..120)] # G. C. Greubel, Jan 19 2022
KEYWORD
nonn
STATUS
approved
a(n) = s(1)*s(n) + s(2)*s(n-1) + ... + s(k)*s(n+1-k), where k = floor((n+1)/2), s = A023531.
+10
19
0, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 2, 1, 0, 0, 1, 0, 1, 1, 0, 2, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1
OFFSET
1,28
LINKS
FORMULA
a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A023531(n-j+1). - G. C. Greubel, Jan 17 2022
MATHEMATICA
A023531[n_]:= SquaresR[1, 8n+9]/2;
a[n_]:= a[n]= Sum[A023531[j]*A023531[n-j+1], {j, Floor[(n+1)/2]}];
Table[a[n], {n, 110}] (* G. C. Greubel, Jan 17 2022 *)
PROG
(Haskell)
a024316 n = sum $ take (div (n + 1) 2) $ zipWith (*) zs $ reverse zs
where zs = take n $ tail a023531_list
-- Reinhard Zumkeller, Feb 14 2015
(Magma)
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
[ (&+[A023531(j)*A023531(n-j+1): j in [1..Floor((n+1)/2)]]) : n in [1..110]]; // G. C. Greubel, Jan 17 2022
(Sage)
def A023531(n):
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
[sum( A023531(j)*A023531(n-j+1) for j in (1..floor((n+1)/2)) ) for n in (1..110)] # G. C. Greubel, Jan 17 2022
KEYWORD
nonn
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = (natural numbers >= 3), t = A023531.
+10
17
3, 3, 10, 17, 37, 59, 114, 185, 334, 540, 938, 1518, 2573, 4163, 6946, 11239, 18559, 30029, 49248, 79685, 130090, 210490, 342596, 554332, 900423, 1456915, 2363370, 3824013, 6197753
OFFSET
1,1
FORMULA
G.f.: x*(3-2*x^2+4*x^3-x^4-3*x^5-2*x^7)/((1-x-x^2)*(1-x^2-x^4)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009
From G. C. Greubel, Jan 17 2022: (Start)
a(2*n) = Lucas(2*n+3) + F(2*n+2) - Lucas(n+3) - (n+1)*F(n+2).
a(2*n+1) = Lucas(2*n+4) + F(2*n+3) - Lucas(n+3) - (n+2)*F(n+2), where F(n) = A000045(n). (End)
MATHEMATICA
a[n_]:= With[{F=Fibonacci}, If[EvenQ[n], LucasL[n+3] + F[n+2] - LucasL[n/2 +3] - (n/2 +1)*F[n/2 +2], LucasL[n+3] + F[n+2] - LucasL[(n+5)/2]-(n+3)/2*Fibonacci[(n+3)/2]]];
Table[a[n], {n, 40}] (* G. C. Greubel, Jan 17 2022 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Integers(), 40);
Coefficients(R!( x*(3-2*x^2+4*x^3-x^4-3*x^5-2*x^7)/((1-x-x^2)*(1-x^2-x^4)^2) )); // G. C. Greubel, Jan 17 2022
(Sage)
def A024313_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x*(3 -2*x^2 +4*x^3 -x^4 -3*x^5 -2*x^7)/((1-x-x^2)*(1-x^2-x^4)^2) ).list()
a=A024313_list(41); a[1:] # G. C. Greubel, Jan 17 2022
KEYWORD
nonn,easy
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = (natural numbers >= 3), t = A023532.
+10
17
3, 9, 24, 37, 81, 133, 256, 413, 746, 1208, 2098, 3394, 5753, 9309, 15532, 25131, 41499, 67147, 110122, 178181, 290890, 470670, 766068, 1239524, 2013407, 3257761, 5284656, 8550753
OFFSET
1,1
FORMULA
G.f.: x*(3 + 6*x + 6*x^2 - 8*x^3 - 7*x^4 + x^5 - 4*x^6 + 2*x^7)/((1 - x - x^2)*(1 - x^2 - x^4)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009
From G. C. Greubel, Jan 17 2022: (Start)
a(2*n) = 6*F(2*n+3) + F(2*n+1) - (n+6)*F(n+3) - (n+1)*F(n+1).
a(2*n+1) = 6*F(2*n+2) + F(2*n) - (n+6)*F(n+2) - (n+1)*F(n), where F(n) = A000045(n). (End)
MATHEMATICA
a[n_]:= With[{F=Fibonacci}, 6*F[n+3] +F[n+1] - (1/2)*((1+(-1)^n)*(((n+2)/2 )*LucasL[(n+4)/2] + 5*F[(n+6)/2]) - (1-(-1)^n)*(((n+3)/2)*LucasL[(n+3)/2] +5*F[(n+5)/2] ))];
Table[a[n], {n, 40}] (* G. C. Greubel, Jan 17 2022 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Integers(), 40);
Coefficients(R!( x*(3+6*x+6*x^2-8*x^3-7*x^4+x^5-4*x^6+2*x^7)/((1-x-x^2)*(1-x^2-x^4)^2) )); // G. C. Greubel, Jan 17 2022
(Sage)
def A024314_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x*(3+6*x+6*x^2-8*x^3-7*x^4+x^5-4*x^6+2*x^7)/((1-x-x^2)*(1-x^2-x^4)^2) ).list()
a=A024314_list(41); a[1:] # G. C. Greubel, Jan 17 2022
KEYWORD
nonn,easy
STATUS
approved
a(n) = s(1)t(n) + s(2)t(n-1) + ... + s(k)t(n-k+1), where k = floor(n/2), s = (natural numbers >= 3), t = (Fibonacci numbers).
+10
17
3, 6, 17, 27, 59, 96, 185, 299, 540, 874, 1518, 2456, 4163, 6736, 11239, 18185, 30029, 48588, 79685, 128933, 210490, 340580, 554332, 896928, 1456915, 2357338, 3824013, 6187383
OFFSET
1,1
FORMULA
G.f.: x*(3 +3*x +2*x^2 -2*x^3 -4*x^4 -x^5 -2*x^6)/((1-x-x^2)*(1-x^2-x^4)^2). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 27 2009
From G. C. Greubel, Jan 16 2022: (Start)
a(2*n) = L(2*n+4) + F(2*n+3) - F(n+5) - (n+2)*F(n+3), n >= 1.
a(2*n-1) = L(2*n+3) + F(2*n+2) - F(n+3) - (n+3)*F(n+2), n >= 1, where L(n) = A000032(n) and F(n) = A000045(n). (End)
MATHEMATICA
a[n_]:= With[{F=Fibonacci}, If[EvenQ[n], LucasL[n+4] +F[n+3] -F[(n+10)/2] -((n+ 4)/2)*F[(n+6)/2], LucasL[n+4] +F[n+3] -F[(n+7)/2] -((n+7)/2)*F[(n+5)/2]]];
Table[a[n], {n, 40}] (* G. C. Greubel, Jan 16 2022 *)
PROG
(Magma)
R<x>:=PowerSeriesRing(Integers(), 40);
Coefficients(R!( x*(3+3*x+2*x^2-2*x^3-4*x^4-x^5-2*x^6)/((1-x-x^2)*(1-x^2-x^4)^2) )); // G. C. Greubel, Jan 16 2022
(Sage)
def A024315_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( x*(3+3*x+2*x^2-2*x^3-4*x^4-x^5-2*x^6)/((1-x-x^2)*(1-x^2-x^4)^2) ).list()
a=A024315_list(41); a[1:] # G. C. Greubel, Jan 16 2022
KEYWORD
nonn,easy
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = A023532.
+10
17
0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 3, 3, 2, 2, 3, 2, 3, 3, 3, 2, 4, 4, 3, 4, 3, 4, 3, 3, 4, 4, 3, 4, 5, 5, 4, 5, 4, 4, 5, 3, 5, 5, 5, 4, 5, 5, 5, 6, 5, 5, 6, 6, 5, 5, 5, 6, 6, 5, 5, 6, 5, 6, 7, 7, 5, 7, 7, 7, 7, 4, 7, 6, 6, 7, 7, 6, 6, 7, 7, 7, 8, 7
OFFSET
1,11
LINKS
FORMULA
a(n) = Sum_{k=1..floor((n+1)/2)} A023531(k)*A023532(n-k+1). - G. C. Greubel, Jan 19 2022
MATHEMATICA
A023531[n_]:= SquaresR[1, 8n+9]/2;
a[n_]:= Sum[A023531[j]*(1 - A023531[n-j+1]), {j, Floor[(n+1)/2]}];
Table[a[n], {n, 90}] (* G. C. Greubel, Jan 19 2022 *)
PROG
(Magma)
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) -3)/2 ) select 1 else 0 >;
[ (&+[A023531(j)*(1 - A023531(n-j+1)): j in [1..Floor((n+1)/2)]]) : n in [1..90]]; // G. C. Greubel, Jan 19 2022
(Sage)
def A023531(n):
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
[sum( A023531(j)*(1-A023531(n-j+1)) for j in (1..floor((n+1)/2)) ) for n in (1..90)] # G. C. Greubel, Jan 19 2022
KEYWORD
nonn
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = (Lucas numbers).
+10
17
0, 0, 3, 4, 7, 11, 18, 29, 58, 94, 152, 246, 398, 644, 1042, 1686, 2804, 4537, 7341, 11878, 19219, 31097, 50316, 81413, 131729, 213142, 345714, 559377, 905091, 1464468, 2369559, 3834027, 6203586
OFFSET
1,3
LINKS
FORMULA
a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*Lucas(n-j+1). - G. C. Greubel, Jan 19 2022
MATHEMATICA
A023531[n_]:= SquaresR[1, 8n+9]/2;
a[n_]:= Sum[A023531[j]*LucasL[n-j+1], {j, Floor[(n+1)/2]}];
Table[a[n], {n, 40}] (* G. C. Greubel, Jan 19 2022 *)
PROG
(Magma)
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) -3)/2 ) select 1 else 0 >;
[ (&+[A023531(j)*Lucas(n-j+1): j in [1..Floor((n+1)/2)]]) : n in [1..40]]; // G. C. Greubel, Jan 19 2022
(Sage)
def A023531(n):
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
[sum( A023531(j)*lucas_number2(n-j+1, 1, -1) for j in (1..floor((n+1)/2)) ) for n in (1..40)] # G. C. Greubel, Jan 19 2022
KEYWORD
nonn
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = (1, p(1), p(2), ... ).
+10
17
0, 0, 2, 3, 5, 7, 11, 13, 24, 30, 36, 46, 50, 60, 70, 74, 103, 117, 131, 139, 157, 171, 177, 193, 207, 221, 278, 294, 310, 330, 348, 360, 390, 408, 424, 448, 470, 486, 573, 611, 625, 653, 673, 699, 739, 761, 781, 803, 835, 863, 891, 925, 1054, 1078, 1104, 1136, 1180, 1214
OFFSET
1,3
LINKS
FORMULA
a(n) = A023531(1) + Sum_{j=2..floor((n+1)/2)} A023531(j)*Prime(n-j+1). - G. C. Greubel, Jan 19 2022
MATHEMATICA
A023531[n_]:= SquaresR[1, 8*n+9]/2;
p[n_]:= If[n==1, 1, Prime[n-1]];
a[n_]:= Sum[A023531[j]*p[n-j+1], {j, Floor[(n+1)/2]}];
Table[a[n], {n, 60}] (* G. C. Greubel, Jan 19 2022 *)
PROG
(Magma)
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) -3)/2 ) select 1 else 0 >;
p:= func< n | n eq 1 select 1 else NthPrime(n-1) >;
[ (&+[A023531(j)*p(n-j+1): j in [1..Floor((n+1)/2)]]) : n in [1..60]]; // G. C. Greubel, Jan 19 2022
(Sage)
def A023531(n):
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
def p(n):
if (n==1): return 1
else: return nth_prime(n-1)
[sum( A023531(j)*p(n-j+1) for j in (1..floor((n+1)/2)) ) for n in (1..60)] # G. C. Greubel, Jan 19 2022
KEYWORD
nonn
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = (composite numbers).
+10
17
0, 0, 6, 8, 9, 10, 12, 14, 25, 28, 32, 35, 37, 40, 44, 46, 64, 69, 73, 77, 81, 85, 89, 93, 96, 100, 128, 133, 139, 144, 148, 154, 162, 166, 170, 176, 181, 187, 223, 229, 236, 242, 248, 255, 262, 268, 275, 281, 287, 294, 301, 308, 354, 361, 370, 380, 386, 394, 401, 408, 418, 425
OFFSET
1,3
LINKS
FORMULA
a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A002808(n-j+1). - G. C. Greubel, Jan 19 2022
MATHEMATICA
A023531[n_]:= SquaresR[1, 8n+9]/2;
Composite[n_]:= FixedPoint[n +PrimePi[#] +1 &, n];
a[n_]:= Sum[A023531[j]*Composite[n-j+1], {j, Floor[(n+1)/2]}];
Table[a[n], {n, 70}] (* G. C. Greubel, Jan 19 2022 *)
PROG
(Magma)
A002808:= [n : n in [2..100] | not IsPrime(n) ];
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) -3)/2 ) select 1 else 0 >;
[ (&+[A023531(j)*A002808[n-j+1]: j in [1..Floor((n+1)/2)]]) : n in [1..70]]; // G. C. Greubel, Jan 19 2022
(Sage)
A002808 = [n for n in (1..250) if sloane.A001222(n) > 1]
def A023531(n):
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
[sum( A023531(j)*A002808[n-j] for j in (1..floor((n+1)/2)) ) for n in (1..70)] # G. C. Greubel, Jan 19 2022
KEYWORD
nonn
STATUS
approved
a(n) = s(1)*t(n) + s(2)*t(n-1) + ... + s(k)*t(n+1-k), where k = floor((n+1)/2), s = A023531, t = (F(2), F(3), ...).
+10
17
0, 0, 2, 3, 5, 8, 13, 21, 42, 68, 110, 178, 288, 466, 754, 1220, 2029, 3283, 5312, 8595, 13907, 22502, 36409, 58911, 95320, 154231, 250161, 404769, 654930, 1059699, 1714629, 2774328, 4488957, 7263285
OFFSET
1,3
LINKS
FORMULA
From G. C. Greubel, Jan 20 2022: (Start)
a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A000045(n-j+1).
a(n) = Sum_{j=1..floor((n+1)/2)} A010054(j+1)*A000045(n-j+2). (End)
MATHEMATICA
A010054[n_]:= SquaresR[1, 8n+1]/2;
a[n_]:= Sum[A010054[j+1]*Fibonacci[n-j+2], {j, Floor[(n+1)/2]}];
Table[a[n], {n, 40}] (* G. C. Greubel, Jan 20 2022 *)
PROG
(Magma)
A023531:= func< n | IsIntegral( (Sqrt(8*n+9) - 3)/2 ) select 1 else 0 >;
[ (&+[A023531(j)*Fibonacci(n-j+2): j in [1..Floor((n+1)/2)]]) : n in [1..40]]; // G. C. Greubel, Jan 20 2022
(Sage)
def A023531(n):
if ((sqrt(8*n+9) -3)/2).is_integer(): return 1
else: return 0
[sum( A023531(j)*fibonacci(n-j+2) for j in (1..floor((n+1)/2)) ) for n in (1..40)] # G. C. Greubel, Jan 20 2022
KEYWORD
nonn
STATUS
approved

Search completed in 0.010 seconds