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 10 results.

A334121 a(n) is the multiplicative inverse of A008514(n) modulo A008514(n+1).

Original entry on oeis.org

1, 40, 271, 183, 1184, 102, 2861, 9102, 4446, 16837, 3483, 25332, 62253, 30739, 88410, 26394, 111803, 2177, 123512, 298353, 110585, 346624, 55398, 366215, 782616, 335806, 866645, 228189, 893798, 9628, 832307, 1873716, 643300, 1905211, 280161, 1793338, 3647187
Offset: 0

Views

Author

Daniel Hoyt, Apr 14 2020

Keywords

Crossrefs

Programs

  • PARI
    f(n) = n^4 + (n+1)^4; \\ A008514
    a(n) = lift(1/Mod(f(n), f(n+1)));
    
  • Python
    import gmpy2
    soc = [] # sum of 4d-centered cubes
    a=0
    b=1
    for i in range(100):
        c = a**4 + b**4
        soc.append(c)
        a += 1
        b += 1
    A334121 = []
    for i in range(len(soc)-1):
        c = gmpy2.invert(soc[i], soc[i+1])
        A334121.append(int(c))
    print(', '.join([str(x) for x in A334121]))

A334137 a(n) is the multiplicative inverse of A008514(n+1) modulo A008514(n).

Original entry on oeis.org

0, 10, 19, 267, 338, 1868, 2069, 948, 7796, 5245, 22215, 17198, 3477, 43855, 21272, 95592, 60647, 186753, 135194, 45969, 263049, 139666, 467532, 301563, 55386, 559636, 241005, 948261, 543212, 1508854, 1001903, 318414, 1664590, 828391, 2587041, 1575400, 280143
Offset: 0

Views

Author

Daniel Hoyt, Apr 15 2020

Keywords

Examples

			For a(0), compute the inverse of 1^4 + 2^4 mod 0^4 + 1^4 which is 0 mod 1, since everything mod 1 is 0.
For a(1), compute the inverse of 2^4 + 3^4 mod 1^4 + 2^4. The inverse of 97 mod 17 (or 12 mod 17) is 10 mod 17 since 10*12 = 120 has remainder 1 mod 17.
		

Crossrefs

Programs

  • PARI
    f(n) = n^4 + (n+1)^4;
    a(n) = lift(1/Mod(f(n+1), f(n)));
    
  • Python
    import gmpy2
    soc = [] # sum of 4d-centered cubes
    a=0
    b=1
    for i in range(100):
        c = a**4 + b**4
        soc.append(c)
        a += 1
        b += 1
    A334137 = []
    for i in range(len(soc)-1):
        c = gmpy2.invert(soc[i+1], soc[i])
        A334137.append(int(c))
    print(', '.join([str(x) for x in A334137]))

A002817 Doubly triangular numbers: a(n) = n*(n+1)*(n^2+n+2)/8.

Original entry on oeis.org

0, 1, 6, 21, 55, 120, 231, 406, 666, 1035, 1540, 2211, 3081, 4186, 5565, 7260, 9316, 11781, 14706, 18145, 22155, 26796, 32131, 38226, 45150, 52975, 61776, 71631, 82621, 94830, 108345, 123256, 139656, 157641, 177310, 198765, 222111, 247456, 274911, 304590
Offset: 0

Views

Author

Keywords

Comments

Number of inequivalent ways to color vertices of a square using <= n colors, allowing rotations and reflections. Group is dihedral group D_8 of order 8 with cycle index (1/8)*(x1^4 + 2*x4 + 3*x2^2 + 2*x1^2*x2); setting all x_i = n gives the formula a(n) = (1/8)*(n^4 + 2*n + 3*n^2 + 2*n^3).
Number of semi-magic 3 X 3 squares with a line sum of n-1. That is, 3 X 3 matrices of nonnegative integers such that row sums and column sums are all equal to n-1. - [Gupta, 1968, page 653; Bell, 1970, page 279]. - Peter Bertok (peter(AT)bertok.com), Jan 12 2002. See A005045 for another version.
Also the coefficient h_2 of x^{n-3} in the shelling polynomial h(x)=h_0*x^n-1 + h_1*x^n-2 + h_2*x^n-3 + ... + h_n-1 for the independence complex of the cycle matroid of the complete graph K_n on n vertices (n>=2) - Woong Kook (andrewk(AT)math.uri.edu), Nov 01 2006
If X is an n-set and Y a fixed 3-subset of X then a(n-4) is equal to the number of 5-subsets of X intersecting Y. - Milan Janjic, Jul 30 2007
Starting with offset 1 = binomial transform of [1, 5, 10, 9, 3, 0, 0, 0, ...]. - Gary W. Adamson, Aug 05 2009
Starting with "1" = row sums of triangle A178238. - Gary W. Adamson, May 23 2010
The equation n*(n+1)*(n^2 + n + 2)/8 may be arrived at by solving for x in the following equality: (n^2+n)/2 = (sqrt(8x+1)-1)/2. - William A. Tedeschi, Aug 18 2010
Partial sums of A006003. - Jeremy Gardiner, Jun 23 2013
Doubly triangular numbers are revealed in the sums of row sums of Floyd's triangle.
1, 1+5, 1+5+15, ...
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
- Tony Foster III, Nov 14 2015
From Jaroslav Krizek, Mar 04 2017: (Start)
For n>=1; a(n) = sum of the different sums of elements of all the nonempty subsets of the sets of numbers from 1 to n.
Example: for n = 6; nonempty subsets of the set of numbers from 1 to 3: {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}; sums of elements of these subsets: 1, 2, 3, 3, 4, 5, 6; different sums of elements of these subsets: 1, 2, 3, 4, 5, 6; a(3) = (1+2+3+4+5+6) = 21, ... (End)
a(n) is also the number of 4-cycles in the (n+4)-path complement graph. - Eric W. Weisstein, Apr 11 2018

Examples

			G.f. = x + 6*x^2 + 21*x^3 + 55*x^4 + 120*x^5 + 231*x^6 + 406*x^7 + 666*x^8 + ...
		

References

  • A. Björner, The homology and shellability of matroids and geometric lattices, in Matroid Applications (ed. N. White), Encyclopedia of Mathematics and Its Applications, 40, Cambridge Univ. Press 1992.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 124, #25, Q(3,r).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics I, p. 292.

Crossrefs

Cf. A006003 (first differences), A165211 (mod 2).
Multiple triangular: A000217, A064322, A066370.
Cf. A006528 (square colorings).
Cf. A236770 (see crossrefs).
Row n=3 of A257493 and row n=2 of A331436 and A343097.
Cf. A000332.
Cf. A000292 (3-cycle count of \bar P_{n+4}), A060446 (5-cycle count of \bar P_{n+3}), A302695 (6-cycle count of \bar P_{n+5}).

Programs

  • Maple
    A002817 := n->n*(n+1)*(n^2+n+2)/8;
  • Mathematica
    a[ n_] := n (n + 1) (n^2 + n + 2) / 8; (* Michael Somos, Jul 24 2002 *)
    LinearRecurrence[{5,-10,10,-5,1}, {0,1,6,21,55},40] (* Harvey P. Dale, Jul 18 2011 *)
    nn=50;Join[{0},With[{c=(n(n+1))/2},Flatten[Table[Take[Accumulate[Range[ (nn(nn+1))/2]], {c,c}],{n,nn}]]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    {a(n) = n * (n+1) * (n^2 + n + 2) / 8}; /* Michael Somos, Jul 24 2002 */
    
  • PARI
    concat(0, Vec(x*(1+x+x^2)/(1-x)^5 + O(x^50))) \\ Altug Alkan, Nov 15 2015
    
  • Python
    def A002817(n): return (m:=n*(n+1))*(m+2)>>3 # Chai Wah Wu, Aug 30 2024

Formula

a(n) = 3*binomial(n+2, 4) + binomial(n+1, 2).
G.f.: x*(1 + x + x^2)/(1-x)^5. - Simon Plouffe (in his 1992 dissertation); edited by N. J. A. Sloane, May 13 2008
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) + 3. - Warut Roonguthai, Dec 13 1999
a(n) = 5a(n-1) - 10a(n-2) + 10a(n-3) - 5a(n-4) + a(n-5) = A000217(A000217(n)). - Ant King, Nov 18 2010
a(n) = Sum(Sum(1 + Sum(3*n))). - Xavier Acloque, Jan 21 2003
a(n) = A000332(n+1) + A000332(n+2) + A000332(n+3), with A000332(n) = binomial(n, 4). - Mitch Harris, Oct 17 2006 and Bruce J. Nicholson, Oct 22 2017
a(n) = Sum_{i=1..C(n,2)} i = C(C(n,2) + 1, 2) = A000217(A000217(n+1)). - Enrique Pérez Herrero, Jun 11 2012
Euler transform of length 3 sequence [6, 0, -1]. - Michael Somos, Nov 19 2015
E.g.f.: x*(8 + 16*x + 8*x^2 + x^3)*exp(x)/8. - Ilya Gutkovskiy, Apr 26 2016
Sum_{n>=1} 1/a(n) = 6 - 4*Pi*tanh(sqrt(7)*Pi/2)/sqrt(7) = 1.25269064911978447... . - Vaclav Kotesovec, Apr 27 2016
a(n) = A000217(n)*A000124(n)/2.
a(n) = ((n-1)^4 + 3*(n-1)^3 + 2*(n-1)^2 + 2*n))/8. - Bruce J. Nicholson, Apr 05 2017
a(n) = (A016754(n)+ A007204(n)- 2) / 32. - Bruce J. Nicholson, Apr 14 2017
a(n) = a(-1-n) for all n in Z. - Michael Somos, Apr 17 2017
a(n) = T(T(n)) where T are the triangular numbers A000217. - Albert Renshaw, Jan 05 2020
a(n) = 2*n^2 - n + 6*binomial(n, 3) + 3*binomial(n, 4). - Ryan Jean, Mar 20 2021
a(n) = (A008514(n) - 1)/16. - Charlie Marion, Dec 20 2024

Extensions

More terms from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 29 1999

A152913 Primes of the form n^4 + (n+1)^4.

Original entry on oeis.org

17, 97, 337, 881, 3697, 10657, 16561, 49297, 66977, 89041, 149057, 847601, 988417, 1146097, 1972097, 2522257, 2836961, 3553777, 3959297, 4398577, 5385761, 7166897, 11073217, 17653681, 32530177, 41532497, 44048497, 55272097, 61627201
Offset: 1

Views

Author

Vincenzo Librandi, Dec 15 2008

Keywords

Comments

Also primes in A008514.
Sequence is disjoint to A005385: If n^4 + (n+1)^4 is a prime p, then (p-1)/2 = n^4 + 2*n^3 + 3*n^2 + 2*n. (p-1)/2 = 8 for n = 1 and (p-1)/2 is divisible by n for n > 1. In each case, (p-1)/2 is not prime.

Examples

			For n=3, n^4 + (n+1)^4 = 337 is prime and (337-1)/2 = 168 = 3*56 is not prime.
		

Crossrefs

Programs

  • Magma
    [ a: n in [1..80] | IsPrime(a) where a is n^4+(n+1)^4 ];
  • Mathematica
    f[n_]:=n^4+(n+1)^4;lst={};Do[a=f[n];If[PrimeQ[a],AppendTo[lst,a]],{n,0,6!}];lst (* Vladimir Joseph Stephan Orlovsky, May 30 2009 *)
    Select[Table[n^4+(n+1)^4,{n,0,700}],PrimeQ]
    Select[Total/@Partition[Range[100]^4,2,1],PrimeQ] (* Harvey P. Dale, Sep 29 2023 *)

Extensions

Edited and extended by Klaus Brockhaus, Dec 21 2008

A160827 a(n) = 3*n^4 + 12*n^3 + 30*n^2 + 36*n + 17.

Original entry on oeis.org

17, 98, 353, 962, 2177, 4322, 7793, 13058, 20657, 31202, 45377, 63938, 87713, 117602, 154577, 199682, 254033, 318818, 395297, 484802, 588737, 708578, 845873, 1002242, 1179377, 1379042, 1603073, 1853378, 2131937, 2440802, 2782097, 3158018, 3570833
Offset: 0

Views

Author

Al Hakanson (hawkuu(AT)gmail.com), May 27 2009

Keywords

Comments

Sums of 3 consecutive fourth powers.

Crossrefs

Cf. A008514.

Programs

  • Magma
    [3*n^4+12*n^3+30*n^2+36*n+17: n in [0..40]]; // Vincenzo Librandi, Aug 27 2011
    
  • Maple
    A000583 := proc(n) n^4 ; end: A160827 := proc(n) add(A000583(i),i=n..n+2) ; end: seq(A160827(n),n=0..40) ; # R. J. Mathar, May 29 2009
  • Mathematica
    Total/@Partition[Range[0,40]^4,3,1] (* or *) LinearRecurrence[{5,-10,10,-5,1},{17,98,353,962,2177},40] (* Harvey P. Dale, Nov 16 2014 *)
    CoefficientList[Series[(2*x^4+7*x^3+33*x^2+13*x+17)/(1-x)^5, {x, 0, 50}], x] (* G. C. Greubel, Apr 30 2018 *)
  • PARI
    a(n)=3*n^4+12*n^3+30*n^2+36*n+17 \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    A160827_list, m = [], [72, -36, 30, 15, 17]
    for _ in range(10**2):
        A160827_list.append(m[-1])
        for i in range(4):
            m[i+1] += m[i] # Chai Wah Wu, Jan 23 2016

Formula

a(n) = Sum_{i=0..2} A000583(n+i) = Sum_{j=n..n+2} j^4.
G.f.: (2*x^4+7*x^3+33*x^2+13*x+17)/(1-x)^5. - Maksym Voznyy (voznyy(AT)mail.ru), Aug 14 2009
E.g.f.: (17 + 81*x + 87*x^2 + 30*x^3 + 3*x^4)*exp(x). - G. C. Greubel, Apr 30 2018

Extensions

Edited and corrected by R. J. Mathar, May 29 2009

A237516 Pyramidal centered square numbers.

Original entry on oeis.org

1, 15, 91, 325, 861, 1891, 3655, 6441, 10585, 16471, 24531, 35245, 49141, 66795, 88831, 115921, 148785, 188191, 234955, 289941, 354061, 428275, 513591, 611065, 721801, 846951, 987715, 1145341, 1321125, 1516411, 1732591, 1971105, 2233441, 2521135, 2835771, 3178981, 3552445, 3957891, 4397095, 4871881
Offset: 1

Views

Author

Kival Ngaokrajang, Feb 08 2014

Keywords

Comments

a(n) is sum of natural numbers filled in order-n diamond.
First differences give A173962.
The unique primitive Pythagorean triple whose inradius T(n) and its long leg and hypotenuse are consecutive natural numbers is (2*T(n)+1, 2*T(n)*(T(n)+1), 2*T(n)*(T(n)+1)+1) and its semiperimeter is (T(n)+1)*(2*T(n)+1) where T(n) = A002378(n). - Miguel-Ángel Pérez García-Ortega, Jun 05 2025

Crossrefs

Programs

  • Mathematica
    Table[Sum[i, {i, 2n(n + 1) + 1}], {n, 0, 29}] (* Alonso del Arte, Feb 09 2014 *)
    LinearRecurrence[{5,-10,10,-5,1},{1,15,91,325,861},60] (* Harvey P. Dale, Apr 21 2018 *)
    a=Table[(n(n+1)),{n,0,29}];Apply[Join,Map[{(#+1)(2#+1)}&,a]] (* Miguel-Ángel Pérez García-Ortega, Jun 05 2025 *)
  • PARI
    Vec(-x*(x^2+4*x+1)*(x^2+6*x+1)/(x-1)^5 + O(x^100)) \\ Colin Barker, Jan 17 2015

Formula

a(n) = 2*n^4 - 4*n^3 + 5*n^2 - 3*n + 1.
a(n) = Sum_{i = 1..(2*n*(n + 1) + 1)} i.
From Colin Barker, Jan 17 2015: (Start)
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5).
G.f.: -x*(x^2+4*x+1)*(x^2+6*x+1)/(x-1)^5. (End)
a(n) = A000217(A001844(n-1)). - Ivan N. Ianakiev, Jun 14 2015
a(n) = A002061(n)*A001844(n-1). - Bruce J. Nicholson, May 14 2017
a(n) = (A002378(n)+1)*(2*A002378(n)+1). - Miguel-Ángel Pérez García-Ortega, Jun 05 2025
E.g.f.: -1 + exp(x)*(1 + 7*x^2 + 8*x^3 + 2*x^4). - Elmo R. Oliveira, Aug 22 2025

A384288 Length of the long leg in the unique primitive Pythagorean triple whose inradius is A002378(n) and such that its long leg and its hypotenuse are consecutive natural numbers.

Original entry on oeis.org

12, 84, 312, 840, 1860, 3612, 6384, 10512, 16380, 24420, 35112, 48984, 66612, 88620, 115680, 148512, 187884, 234612, 289560, 353640, 427812, 513084, 610512, 721200, 846300, 987012, 1144584, 1320312, 1515540, 1731660, 1970112, 2232384, 2520012, 2834580
Offset: 1

Views

Author

Keywords

Examples

			Triangles begin:
  n=1:      5,   12,   13;
  n=2:     13,   84,   85;
  n=3:     25,  312,  313;
  ...
This sequence gives the middle column.
		

Crossrefs

Cf. A002378 (inradius), A001844 (short leg), A008514 (sum of the legs), A237516 (semiperimeter), A384566 (area).

Formula

a(n) = 2 * A002378(n) * (A002378(n) + 1).

A384566 Area of the unique primitive Pythagorean triple whose inradius is A002378(n) and such that its long leg and its hypotenuse are consecutive natural numbers.

Original entry on oeis.org

0, 30, 546, 3900, 17220, 56730, 153510, 360696, 762120, 1482390, 2698410, 4652340, 7665996, 12156690, 18654510, 27821040, 40469520, 57586446, 80354610, 110177580, 148705620, 197863050, 259877046, 337307880, 433080600, 550518150, 693375930, 865877796, 1072753500, 1319277570, 1611309630
Offset: 0

Views

Author

Keywords

Comments

a(n) is multiple of 6 for all n.

Examples

			For n=1, the short leg is A384288(1,1) = 5 and the long leg is A384288(1,2) = 12 so the area is then a(1) = (5 * 12 )/2 = 30.
		

Crossrefs

Programs

  • Mathematica
    a=Table[(n(n+1)),{n,0,30}];Apply[Join,Map[{#(#+1)(2#+1)}&,a]]

Formula

a(n) = (A384288(n,1) * A384288(n,2))/2.
a(n) = A002378(n)*(A002378(n) + 1)*(2*A002378(n) + 1).

A210694 T(n,k)=Number of (n+1)X(n+1) -k..k symmetric matrices with every 2X2 subblock having sum zero.

Original entry on oeis.org

5, 13, 9, 25, 35, 17, 41, 91, 97, 33, 61, 189, 337, 275, 65, 85, 341, 881, 1267, 793, 129, 113, 559, 1921, 4149, 4825, 2315, 257, 145, 855, 3697, 10901, 19721, 18571, 6817, 513, 181, 1241, 6497, 24583, 62281, 94509, 72097, 20195, 1025, 221, 1729, 10657, 49575
Offset: 1

Views

Author

R. H. Hardin, with R. J. Mathar in the Sequence Fans Mailing List, Mar 30 2012

Keywords

Comments

Table starts
...5....13.....25......41.......61.......85.......113.......145........181
...9....35.....91.....189......341......559.......855......1241.......1729
..17....97....337.....881.....1921.....3697......6497.....10657......16561
..33...275...1267....4149....10901....24583.....49575.....91817.....159049
..65...793...4825...19721....62281...164305....379793....793585....1531441
.129..2315..18571...94509...358061..1103479...2920695...6880121...14782969
.257..6817..72097..456161..2070241..7444417..22542017..59823937..143046721
.513.20195.281827.2215269.12030821.50431303.174571335.521638217.1387420489
Solutions are determined by the diagonal, extended with x(i,j) = (x(i,i)+x(j,j))/2 * (-1)^(i-j)

Examples

			Some solutions for n=3 k=4
.-2..1.-3..0....0.-1..0..1....4..0..1.-1....2.-1.-1.-2....3.-2..1..0
..1..0..2..1...-1..2.-1..0....0.-4..3.-3...-1..0..2..1...-2..1..0.-1
.-3..2.-4..1....0.-1..0..1....1..3.-2..2...-1..2.-4..1....1..0.-1..2
..0..1..1..2....1..0..1.-2...-1.-3..2.-2...-2..1..1..2....0.-1..2.-3
		

Crossrefs

Column 1 is A000051(n+1)
Column 2 is A007689(n+1)
Column 3 is A074605(n+1)
Column 4 is A074611(n+1)
Column 5 is A074615(n+1)
Column 6 is A074619(n+1)
Column 7 is A074622(n+1)
Column 8 is A074624(n+1)
Row 1 is A001844
Row 2 is A005898
Row 3 is A008514
Row 4 is A008515
Row 5 is A008516
Row 6 is A036085
Row 7 is A036086
Row 8 is A036087

Formula

T(n,k)=k^(n+1)+(k+1)^(n+1)

A267691 a(n) = (n + 1)*(6*n^4 - 21*n^3 + 31*n^2 - 31*n + 30)/30.

Original entry on oeis.org

1, 1, 2, 18, 99, 355, 980, 2276, 4677, 8773, 15334, 25334, 39975, 60711, 89272, 127688, 178313, 243849, 327370, 432346, 562667, 722667, 917148, 1151404, 1431245, 1763021, 2153646, 2610622, 3142063, 3756719, 4464000, 5274000, 6197521, 7246097, 8432018, 9768354
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 19 2016

Keywords

Examples

			a(0) = 1,
a(1) = 1 + 0^4 = 1,
a(2) = 1 + 1^4 = 2,
a(3) = 2 + 2^4 = 18,
a(4) = 18+ 3^4 = 99, etc.
		

Crossrefs

Essentially the same as A000538.
Cf. A013662 (zeta(4)).

Programs

  • Magma
    [(n+1)*(6*n^4-21*n^3+31*n^2-31*n+30)/30: n in [0..35]]; // Vincenzo Librandi, Jan 20 2016
  • Mathematica
    Table[(n + 1) (6 n^4 - 21 n^3 + 31 n^2 - 31 n + 30)/30, {n, 0, 30}]
    LinearRecurrence[{6, -15, 20, -15, 6, -1}, {1, 1, 2, 18, 99, 355}, 40] (* Vincenzo Librandi, Jan 20 2016 *)
  • PARI
    a(n)=(n+1)*(6*n^4-21*n^3+31*n^2-31*n+30)/30 \\ Charles R Greathouse IV, Jan 19 2016
    
  • PARI
    Vec((1-5*x+11*x^2+x^3+16*x^4)/(x-1)^6 + O(x^100)) \\ Altug Alkan, Jan 19 2016
    

Formula

G.f.: (1 - 5*x + 11*x^2 + x^3 + 16*x^4)/(1 - x)^6.
a(n + 1) = a(n) + n^4.
a(n + 1) = A000538(n) + 1.
a(n + 2) - a(n) = A008514(n).
Sum_{n>=0} 1/a(n) = 2.570450909491318975...
Sum_{n>=1} 1/(a(n + 1) - a(n)) = zeta(4) = Pi^4/90.
Showing 1-10 of 10 results.