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.

Previous Showing 21-29 of 29 results.

A160636 Hankel transform of A114464.

Original entry on oeis.org

1, 0, -1, -2, -8, 0, 128, 1024, 16384, 0, -4194304, -134217728, -8589934592, 0, 35184372088832, 4503599627370496, 1152921504606846976, 0, -75557863725914323419136, -38685626227668133590597632
Offset: 0

Views

Author

Paul Barry, May 21 2009

Keywords

Comments

Hankel transform of A114464(n+1) is A160637.

Crossrefs

Programs

  • Magma
    R:= RealField(); [Round(2^Floor(Binomial(n,2)/2)*((Sqrt(2)/2 -1/2)*Sin(3*Pi(R)*n/4+Pi(R)/4)+(Sqrt(2)/2+1/2)*Cos(Pi(R)*n/4+Pi(R)/4))): n in [0..50]]; // G. C. Greubel, May 03 2018
    
  • Mathematica
    Table[Round[2^Floor[Binomial[n, 2]/2]*((Sqrt[2]-1)*Sin[(3*n+1)*Pi/4]/2 + (Sqrt[2]+1)*Cos[(n+1)*Pi/4]/2)], {n, 0, 50}] (* G. C. Greubel, May 03 2018 *)
    a[ n_] := -Sign[Mod[n - 1, 4]]*(-1)^Quotient[n - 1, 4]*2^Quotient[n (n - 1), 4]; (* Michael Somos, Mar 14 2020 *)
  • PARI
    for(n=0,50, print1(round(2^floor(binomial(n,2)/2)*((sqrt(2)-1)*sin((3*n+1)*Pi/4)/2 +(sqrt(2)+1)*cos((n+1)*Pi/4)/2)), ", ")) \\ G. C. Greubel, May 03 2018
    
  • PARI
    A160636(n)=if(n%4!=1,(-1)^((n+2)\4)<<(binomial(n,2)\2),0) \\ M. F. Hasler, May 09 2018

Formula

a(n) = 2^floor(C(n,2)/2)*((sqrt(2)-1)*sin((3*n+1)*Pi/4)/2 +(sqrt(2)+1)*cos((n+1)*Pi/4)/2).
a(4k+1) = 0, a(n) = (-1)^floor((n+2)/4) * 2^A011848(n) if n !== 1 (mod 4), where A011848(n) = floor(C(n,2)/2). - M. F. Hasler, May 09 2018
a(n) = -a(2-n) * 2^A004524(n) for all n in Z. - Michael Somos, Mar 14 2020

Extensions

Comment with an incorrect formula deleted by M. F. Hasler, May 09 2018

A174102 Triangle read by rows: T(n, m) = floor(binomial(n+1, m)* binomial(n+2, m)/(2*m+2)), 1 <= m <= n.

Original entry on oeis.org

1, 3, 3, 5, 10, 5, 7, 25, 25, 7, 10, 52, 87, 52, 10, 14, 98, 245, 245, 98, 14, 18, 168, 588, 882, 588, 168, 18, 22, 270, 1260, 2646, 2646, 1260, 270, 22, 27, 412, 2475, 6930, 9702, 6930, 2475, 412, 27, 33, 605, 4537, 16335, 30492, 30492, 16335, 4537, 605, 33
Offset: 1

Views

Author

Roger L. Bagula, Mar 07 2010

Keywords

Comments

Row sums are {1, 6, 20, 64, 211, 714, 2430, 8396, 29390, 104004, 371448, 1337216, ...}.

Examples

			Triangle begins as:
   1;
   3,   3;
   5,  10,    5;
   7,  25,   25,    7;
  10,  52,   87,   52,   10;
  14,  98,  245,  245,   98,   14;
  18, 168,  588,  882,  588,  168,   18;
  22, 270, 1260, 2646, 2646, 1260,  270,  22;
  27, 412, 2475, 6930, 9702, 6930, 2475, 412, 27;
		

Crossrefs

Cf. A166454.
Cf. A011848 (right diagonal).

Programs

  • Magma
    [[Floor(Binomial(n+1, k)*Binomial(n+2, k)/(2*k+2)): k in [1..n]]: n in [1..12]]; // G. C. Greubel, Apr 13 2019
    
  • Mathematica
    T[n_, k_] = Floor[Binomial[n+1, k]*Binomial[n+2, k]/(2*(k+1))];
    Table[T[n, k], {n,1,12}, {k,1,n}]//Flatten (* modified by G. C. Greubel, Apr 13 2019 *)
  • PARI
    {T(n,k) = (binomial(n+1,k)*binomial(n+2,k)/(2*k+2))\1};
    for(n=1,12, for(k=1,n, print1(T(n,k), ", "))) \\ G. C. Greubel, Apr 13 2019
    
  • Sage
    [[floor(binomial(n+1,k)*binomial(n+2,k)/(2*k+2)) for k in (1..n)] for n in (1..12)] # G. C. Greubel, Apr 13 2019

Formula

T(n, m) = floor(binomial(n+1, m-1)*binomial(n+2, m-1)/(2*m)).

Extensions

Partially edited by Jon E. Schoenfield, Dec 02 2013
Edited by G. C. Greubel, Apr 13 2019

A215099 a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is prime.

Original entry on oeis.org

0, 1, 2, 4, 5, 7, 8, 10, 11, 13, 18, 24, 25, 29, 34, 38, 39, 41, 44, 48, 53, 55, 56, 58, 71, 73, 78, 84, 85, 89, 94, 102, 103, 109, 120, 124, 131, 133, 138, 144, 145, 149, 162, 164, 169, 173, 178, 180, 181, 187, 192, 196, 197, 201
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

For n>0 and (n mod 4)<2, a(n) is odd.
Same definition, but k+a(n-2) is a
Fibonacci number: A006498 except first two terms,
Lucas number: A000045 except first two terms,
Pell number: A089928(n-1),
Jacobsthal number: A215095,
factorial: A215096,
square: A194274,
cube: A215097,
triangular number: A011848(n+2),
oblong number: A215098.
Example of a related sequence definition: a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a cube.

Crossrefs

Cf. A062042: a(1) = 2, a(n) = least k>a(n-1) such that k+a(n-1) is a prime.

Programs

  • PARI
    first(n) = my(res = vector(n, i, i-1), k); for(x=3, n, k=res[x-1]+1; while(!isprime(k+res[x-2]), k++); res[x]=k); res \\ Iain Fox, Apr 22 2019 (corrected by Iain Fox, Apr 25 2019)
  • Python
    from sympy import prime
    prpr = 0
    prev = 1
    for n in range(77):
        print(prpr, end=', ')
        b = c = 0
        while c<=prev:
            c = prime(b+1) - prpr
            b+=1
        prpr = prev
        prev = c
    

A231559 a(n) = floor( A000326(n)/2 ).

Original entry on oeis.org

0, 0, 2, 6, 11, 17, 25, 35, 46, 58, 72, 88, 105, 123, 143, 165, 188, 212, 238, 266, 295, 325, 357, 391, 426, 462, 500, 540, 581, 623, 667, 713, 760, 808, 858, 910, 963, 1017, 1073, 1131, 1190, 1250, 1312, 1376, 1441, 1507, 1575, 1645, 1716, 1788, 1862, 1938
Offset: 0

Views

Author

Bruno Berselli, Nov 11 2013

Keywords

Comments

First trisection of A011865.

Crossrefs

Cf. pentagonal numbers: A000326.
Cf. A011848 for the triangular numbers: floor(A000217/2); A007590 for the squares: floor(A000290/2); A156859 for the hexagonal numbers: floor(A000384/2).
First differences: A047262.

Programs

  • Magma
    [Floor(n*(3*n-1)/4): n in [0..60]];
  • Mathematica
    Table[Floor[n (3 n - 1)/4], {n, 0, 60}]
    CoefficientList[Series[x^2(2+x^2)/((1+x^2)(1-x)^3),{x,0,70}],x] (* or *) LinearRecurrence[{3,-4,4,-3,1},{0,0,2,6,11},70] (* Harvey P. Dale, Jan 28 2022 *)

Formula

G.f.: x^2*(2 + x^2)/((1 + x^2)*(1 - x)^3).
a(n) = ( n*(3*n-1) + i^(n*(n+1)) - 1 )/4, where i=sqrt(-1).

A373584 a(n) is equal to the number of shaded cells in a regular hexagon with side n drawn on a hexagonal grid.

Original entry on oeis.org

1, 7, 13, 19, 31, 49, 67, 85, 109, 139, 169, 199, 235, 277, 319, 361, 409, 463, 517, 571, 631, 697, 763, 829, 901, 979, 1057, 1135, 1219, 1309, 1399, 1489, 1585, 1687, 1789, 1891, 1999, 2113, 2227, 2341, 2461, 2587, 2713, 2839, 2971, 3109, 3247, 3385, 3529
Offset: 1

Views

Author

Nicolay Avilov, Jun 10 2024

Keywords

Comments

On a hexagonal grid, cells are colored as follows: one cell and all those located along three straight lines passing through the center of the original cell and forming six 60° angles between each other are painted. In each of these corners, cells are painted over so that a V-shaped arrangement of cells repeats ad infinitum. The number of shaded cells in regular hexagons centered on the starting cell determines the sequence a(n).

Examples

			a(3) = 19 - 6*1 = 13;
a(4) = 37 - 6*3 = 19.
                                                   o . o . o
                                 o . . o          . o . . o .
                   o . o        . o . o .        o . o . o . o
         o o      . o o .      . . o o . .      . . . o o . . .
   o    o o o    o o o o o    o o o o o o o    o o o o o o o o o
         o o      . o o .      . . o o . .      . . . o o . . .
                   o . o        . o . o .        o . o . o . o
                                 o . . o          . o . . o .
                                                   o . o . o
   1      7         13             19                 31
		

Crossrefs

Programs

  • Mathematica
    Table[6*Ceiling[n*(n - 1)/4] + 1, {n, 100}] (* Paolo Xausa, Jul 01 2024 *)

Formula

a(n+4) = a(n) + 12*n + 18.
a(n) = 6*ceiling(n*(n - 1)/4) + 1.
a(n) = A003215(n) - 6*A011848(n+1).
a(n) = 6*A054925(n) + 1.
G.f.: (1 + 4*x - 4*x^2 + 4*x^3 + x^4)/((1 - x)^3*(1 + x^2)). - Stefano Spezia, Jun 11 2024
E.g.f.: (exp(x)*(5 + 6*x + 3*x^2) - 3*cos(x) + 3*sin(x))/2. - Stefano Spezia, Aug 31 2025

A024174 a(n) is floor((4th elementary symmetric function of 1,2,..,n)/(3rd elementary symmetric function of 1,2,...,n)).

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 6, 8, 10, 13, 16, 19, 22, 25, 29, 33, 37, 42, 47, 52, 57, 62, 68, 74, 80, 87, 94, 101, 108, 115, 123, 131, 139, 148, 157, 166, 175, 184, 194, 204, 214, 225, 236, 247, 258, 269, 281, 293, 305, 318, 331, 344, 357, 370, 384, 398, 412, 427, 442
Offset: 3

Views

Author

Keywords

Examples

			G.f. = x^5 + 2*x^6 + 3*x^7 + 4*x^8 + 6*x^9 + 8*x^10 + 10*x^11 + 13*x^12 + ...
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[(n - 3) (15 n^3 + 15 n^2 - 10 n - 8)/(120 n (n + 1))], {n, 3, 45}] (* Ivan Neretin, Nov 25 2016 *)
    Insert[Table[Floor[1/8 (-2 - 3 n + n^2)], {n, 4, 45}], 0, 1] (* Ralf Steiner, Oct 27 2021 *)
  • PARI
    {a(n) = if( n<4, 0, (n-3) * (15*n^3 + 15*n^2 - 10*n - 8) \ (120 * n * (n+1)))}; /* Michael Somos, Nov 25 2016 */

Formula

Empirical g.f.: x^5*(x^7-2*x^6+2*x^5-2*x^4+x^3-x^2+x-1) / ((x-1)^3*(x^2+1)*(x^4+1)). - Colin Barker, Aug 16 2014
a(n) = floor( A000915(n-3)/A001303(n-2) ). - R. J. Mathar, Sep 23 2016
a(n) = floor((n - 3)*(15n^3 + 15n^2 - 10n - 8)/(120*n*(n + 1))). - Ivan Neretin, Nov 25 2016
a(n) = floor((A000217(n-2)/2 - 1)/2) = floor((n^2 - 3*n - 2)/8), n >= 4. - Ralf Steiner, Oct 25 2021

Extensions

Offset set to 3 by R. J. Mathar, Sep 23 2016

A104563 A floretion-generated sequence relating to centered square numbers.

Original entry on oeis.org

0, 1, 3, 5, 8, 13, 19, 25, 32, 41, 51, 61, 72, 85, 99, 113, 128, 145, 163, 181, 200, 221, 243, 265, 288, 313, 339, 365, 392, 421, 451, 481, 512, 545, 579, 613, 648, 685, 723, 761, 800, 841, 883, 925, 968, 1013, 1059, 1105, 1152, 1201, 1251
Offset: 0

Views

Author

Creighton Dement, Mar 15 2005

Keywords

Comments

Floretion Algebra Multiplication Program, FAMP Code: a(n) = 1vesrokseq[A*B] with A = - .5'i - .5i' + .5'ii' + .5e, B = + .5'ii' - .5'jj' + .5'kk' + .5e. RokType: Y[sqa.Findk()] = Y[sqa.Findk()] + Math.signum(Y[sqa.Findk()])*p (internal program code). Note: many slight variations of the "RokType" already exist, such that it has become difficult to assign them all names.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -4, 4, -3, 1}, {0, 1, 3, 5, 8}, 60] (* Amiram Eldar, Dec 14 2024 *)
  • PARI
    concat(0, Vec(x*(1 + x)*(1 - x + x^2) / ((1 - x)^3*(1 + x^2)) + O(x^40))) \\ Colin Barker, Apr 29 2019

Formula

G.f.: x*(1 + x^3)/((1 + x^2)*(1 - x)^3).
FAMP result: 2*a(n) + 2*A004525(n+1) = A104564(n) + a(n+1).
Superseeker results:
a(2*n+1) = A001844(n) = 2*n*(n+1) + 1 (Centered square numbers);
a(n+1) - a(n) = A098180(n) (Odd numbers with two times the odd numbers repeated in order between them);
a(n) + a(n+2) = A059100(n+1) = A010000(n+1);
a(n+2) - a(n) = A047599(n+1) (Numbers that are congruent to {0, 3, 4, 5} mod 8);
a(n+2) - 2*a(n+1) + a(n) = A007877(n+3) (Period 4 sequence with initial period (0, 1, 2, 1));
Coefficients of g.f.*(1-x)/(1+x) = convolution of this with A280560 gives A004525;
Coefficients of g.f./(1+x) = convolution of this with A033999 gives A054925.
a(n) = (1/2)*(n^2 + 1 - cos(n*Pi/2)). - Ralf Stephan, May 20 2007
From Colin Barker, Apr 29 2019: (Start)
a(n) = (2 - (-i)^n - i^n + 2*n^2) / 4 where i=sqrt(-1).
a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>4. (End)
a(n) = A011848(n-1)+A011848(n+2). - R. J. Mathar, Sep 11 2019
Sum_{n>=1} 1/a(n) = Pi^2/48 + (Pi/2) * tanh(Pi/2) + (Pi/(4*sqrt(2)) * tanh(Pi/(2*sqrt(2)))). - Amiram Eldar, Dec 14 2024

Extensions

Stephan's formula corrected by Bruno Berselli, Apr 29 2019

A215095 a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a Jacobsthal number.

Original entry on oeis.org

0, 1, 3, 4, 8, 17, 35, 68, 136, 273, 547, 1092, 2184, 4369, 8739, 17476, 34952, 69905, 139811, 279620, 559240, 1118481, 2236963, 4473924, 8947848, 17895697, 35791395, 71582788, 143165576, 286331153, 572662307, 1145324612, 2290649224, 4581298449, 9162596899
Offset: 0

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

Same definition, but k+a(n-2) is a
Fibonacci number: A006498 except first two terms,
Lucas number: A000045 except first two terms,
Pell number: A089928(n-1),
factorial: A215096,
square: A194274,
cube: A215097,
triangular number: A011848(n+2),
oblong number: A215098,
prime number: A215099.
Example of a related sequence definition: a(0)=0, a(1)=1, a(n) = least k>a(n-1) such that k+a(n-2) is a cube.

Crossrefs

Programs

  • Python
    prpr = 0
    prev = 1
    jac = [0]*10000
    for n in range(10000):
        jac[n] = prpr
        curr = prpr*2 + prev
        prpr = prev
        prev = curr
    prpr, prev = 0, 1
    for n in range(1, 44):
        print(prpr, end=', ')
        b = c = 0
        while c<=prev:
            c = jac[b] - prpr
            b+=1
        prpr = prev
        prev = c

Formula

Conjecture: G.f. (x+2*x^2)/(1-x-x^2-x^3-2*x^4). - David Scambler, Aug 06 2012

A289708 Number of matchings in the n-triangular honeycomb queen graph.

Original entry on oeis.org

1, 4, 51, 2468, 516950, 514413280, 2620954569792
Offset: 1

Views

Author

Eric W. Weisstein, Jul 14 2017

Keywords

Crossrefs

Cf. A011848 (matching number), A289878, A289884, A289709.

Extensions

Name corrected by Andrew Howroyd, Jul 17 2017
Previous Showing 21-29 of 29 results.