cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 18 results. Next

A023531 a(n) = 1 if n is of the form m(m+3)/2, otherwise 0.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Clark Kimberling, Jun 14 1998

Keywords

Comments

Can be read as table: a(n,m) = 1 if n = m >= 0, else 0 (unit matrix).
a(n) = number of 1's between successive 0's (see also A005614, A003589 and A007538). - Eric Angelini, Jul 06 2005
Triangle T(n,k), 0 <= k <= n, read by rows, given by A000004 DELTA A000007 where DELTA is the operator defined in A084938. - Philippe Deléham, Jan 03 2009
Sequence B is called a reverse reluctant sequence of sequence A, if B is triangle array read by rows: row number k lists first k elements of the sequence A in reverse order.
A023531 is reverse reluctant sequence of sequence A000007. - Boris Putievskiy, Jan 11 2013
Also the Bell transform (and the inverse Bell transform) of 0^n (A000007). For the definition of the Bell transform see A264428. - Peter Luschny, Jan 19 2016
This is the turn sequence of the triangle spiral. To form the spiral: go a unit step forward, turn left a(n)*120 degrees, and repeat. The triangle sides are the runs of a(n)=0 (no turn). The sequence can be generated by a morphism with a special symbol S for the start of the sequence: S -> S,1; 1 -> 0,1; 0->0. The expansion lengthens each existing side and inserts a new unit side at the start. See the Fractint L-system in the links to draw the spiral this way. - Kevin Ryde, Dec 06 2019

Examples

			As a triangle:
       1
      0 1
     0 0 1
    0 0 0 1
   0 0 0 0 1
  0 0 0 0 0 1
G.f. = 1 + x^2 + x^5 + x^9 + x^14 + x^20 + x^27 + x^35 + x^44 + x^54 + ...
From _Kevin Ryde_, Dec 06 2019: (Start)
.
              1            Triangular spiral: start at S;
             / \             go a unit step forward,
            0   0   .        turn left a(n)*120 degrees,
           /     \   .       repeat.
          0   1   0   .
         /   / \   \   \   Each side's length is 1 greater
        0   0   0   0   0    than that of the previous side.
       /   /     \   \   \
      0   0   S---1   0   0
     /   /             \   \
    0   1---0---0---0---1   0
   /                         \
  1---0---0---0---0---0---0---1
(End)
		

Crossrefs

Programs

  • Haskell
    a023531 n = a023531_list !! n
    a023531_list = concat $ iterate ([0,1] *) [1]
    instance Num a => Num [a] where
       fromInteger k = [fromInteger k]
       (p:ps) + (q:qs) = p + q : ps + qs
       ps + qs         = ps ++ qs
       (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
        *                = []
    -- Reinhard Zumkeller, Apr 02 2011
    
  • Maple
    seq(op([0$m,1]),m=0..10); # Robert Israel, Jan 18 2015
    # alternative
    A023531 := proc(n)
        option remember ;
        local m,t ;
        for m from 0 do
            t := m*(m+3)/2 ;
            if t > n then
                return 0 ;
            elif t = n then
                return 1 ;
            end if;
        end do:
    end proc:
    seq(A023531(n),n=0..40) ; # R. J. Mathar, May 15 2025
  • Mathematica
    If[IntegerQ[(Sqrt[9+8#]-3)/2],1,0]&/@Range[0,100] (* Harvey P. Dale, Jul 27 2011 *)
    a[ n_] := If[ n < 0, 0, Boole @ IntegerQ @ Sqrt[ 8 n + 9]]; (* Michael Somos, May 17 2014 *)
    a[ n_] := SeriesCoefficient[ (EllipticTheta[ 2, 0, x^(1/2)] / (2 x^(1/8)) - 1) / x, {x, 0, n}]; (* Michael Somos, May 17 2014 *)
  • PARI
    {a(n) = if( n<0, 0, issquare(8*n + 9))}; /* Michael Somos, May 17 2014 */
    
  • PARI
    A023531(n)=issquare(8*n+9) \\ M. F. Hasler, Apr 12 2018
    
  • Python
    from math import isqrt
    def A023531(n): return int((k:=n+1<<1)==(m:=isqrt(k))*(m+1)) # Chai Wah Wu, Nov 09 2024
  • Sage
    def A023531_row(n) :
        if n == 0: return [1]
        return [0] + A023531_row(n-1)
    for n in (0..9): print(A023531_row(n))  # Peter Luschny, Jul 22 2012
    

Formula

If (floor(sqrt(2*n))-(2*n/(floor(sqrt(2*n)))) = -1, 1, 0). - Gerald Hillier, Sep 11 2005
a(n) = 1 - A023532(n); a(n) = 1 - mod(floor(((10^(n+2) - 10)/9)10^(n+1 - binomial(floor((1+sqrt(9+8n))/2), 2) - (1+floor(log((10^(n+2) - 10)/9, 10))))), 10). - Paul Barry, May 25 2004
a(n) = floor((sqrt(9+8n)-1)/2) - floor((sqrt(1+8n)-1)/2). - Paul Barry, May 25 2004
a(n) = round(sqrt(2n+3)) - round(sqrt(2n+2)). - Hieronymus Fischer, Aug 06 2007
a(n) = ceiling(2*sqrt(2n+3)) - floor(2*sqrt(2n+2)) - 1. - Hieronymus Fischer, Aug 06 2007
From Franklin T. Adams-Watters, Jun 29 2009: (Start)
G.f.: (1/2 x^{-1/8}theta_2(0,x^{1/2}) - 1)/x, where theta_2 is a Jacobi theta function.
G.f. for triangle: Sum T(n,k) x^n y^k = 1/(1-x*y). Sum T(n,k) x^n y^k / n! = Sum T(n,k) x^n y^k / k! = exp(x*y). Sum T(n,k) x^n y^k / (n! k!) = I_0(2*sqrt(x*y)), where I is the modified Bessel function of the first kind. (End)
a(n) = A000007(m), where m=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2). - Boris Putievskiy, Jan 11 2013
The row polynomials are p(n,x) = x^n = (-1)^n n!Lag(n,-n,x), the normalized, associated Laguerre polynomials of order -n. As the prototypical Appell sequence with e.g.f. exp(x*y), its raising operator is R = x and lowering operator, L = d/dx, i.e., R p(n,x) = p(n+1,x), and L p(n,x) = n * p(n-1,x). - Tom Copeland, May 10 2014
a(n) = A010054(n+1) if n >= 0. - Michael Somos, May 17 2014
a(n) = floor(sqrt(2*(n+1)+1/2)-1/2) - floor(sqrt(2*n+1/2)-1/2). - Mikael Aaltonen, Jan 18 2015
a(n) = A003057(n+3) - A003057(n+2). - Robert Israel, Jan 18 2015
a(A000096(n)) = 1; a(A007701(n)) = 0. - Reinhard Zumkeller, Feb 14 2015
Characteristic function of A000096. - M. F. Hasler, Apr 12 2018
Sum_{k=1..n} a(k) ~ sqrt(2*n). - Amiram Eldar, Jan 13 2024

A024318 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).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*Fibonacci(n-j+1). - G. C. Greubel, Jan 19 2022

A024317 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.

Original entry on oeis.org

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, 6, 8, 8, 7, 8, 7, 7, 7, 7, 8, 8, 8, 6, 8, 7, 8, 8, 7, 8, 9, 8, 8
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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

Formula

a(n) = Sum_{k=1..floor((n+1)/2)} A023531(k)*A023532(n-k+1). - G. C. Greubel, Jan 19 2022

A024312 a(n) = s(1)*s(n) + s(2)*s(n-1) + ... + s(k)*s(n+1-k), where k = floor((n+1)/2), s = (natural numbers >= 3).

Original entry on oeis.org

9, 12, 31, 38, 70, 82, 130, 148, 215, 240, 329, 362, 476, 518, 660, 712, 885, 948, 1155, 1230, 1474, 1562, 1846, 1948, 2275, 2392, 2765, 2898, 3320, 3470, 3944, 4112, 4641, 4828, 5415, 5622, 6270, 6498, 7210, 7460, 8239, 8512, 9361, 9658, 10580, 10902, 11900, 12248, 13325
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [(&+[j*(n+5-j): j in [3..Floor((n+5)/2)]]) : n in [1..50]]; // G. C. Greubel, Jan 17 2022
    
  • Mathematica
    Table[Sum[j*(n-j+5), {j, 3, Floor[(n+5)/2]}], {n, 50}] (* G. C. Greubel, Jan 17 2022 *)
    LinearRecurrence[{1,3,-3,-3,3,1,-1},{9,12,31,38,70,82,130},60] (* Harvey P. Dale, Aug 23 2024 *)
  • PARI
    a(n)=((75+182*n+63*n^2+4*n^3)-3*(25+10*n+n^2)*(-1)^n)/48 \\ Charles R Greathouse IV, Oct 21 2022
  • Sage
    [( (75 +182*n +63*n^2 +4*n^3) - 3*(25 +10*n +n^2)*(-1)^n )/48 for n in (1..50)] # G. C. Greubel, Jan 17 2022
    

Formula

From G. C. Greubel, Jan 17 2022: (Start)
a(n) = ( (75 + 182*n + 63*n^2 + 4*n^3) - 3*(25 + 10*n + n^2)*(-1)^n )/48.
G.f.: x*(9 + 3*x - 8*x^2 - 2*x^3 + 2*x^4)/((1-x)^4 * (1+x)^3).
a(n) = (-60 - 18*n + (14 + 3*n)*f(n) + 3*(4+n)*f(n)^2 - 2*f(n)^3)/6, where f(n) = floor((n+5)/2). (End)

A024313 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.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    R:=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
    
  • 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 *)
  • Sage
    def A024313_list(prec):
        P. = 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

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)

A024314 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.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    R:=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
    
  • 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 *)
  • Sage
    def A024314_list(prec):
        P. = 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

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)

A024315 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).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    R:=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
    
  • 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 *)
  • Sage
    def A024315_list(prec):
        P. = 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

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)

A024319 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).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*Lucas(n-j+1). - G. C. Greubel, Jan 19 2022

A024320 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), ... ).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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

Formula

a(n) = A023531(1) + Sum_{j=2..floor((n+1)/2)} A023531(j)*Prime(n-j+1). - G. C. Greubel, Jan 19 2022

A024321 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).

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • 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
    
  • 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 *)
  • 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

Formula

a(n) = Sum_{j=1..floor((n+1)/2)} A023531(j)*A002808(n-j+1). - G. C. Greubel, Jan 19 2022
Showing 1-10 of 18 results. Next