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 61-70 of 79 results. Next

A005353 Number of 2 X 2 matrices with entries mod n and nonzero determinant.

Original entry on oeis.org

0, 6, 48, 168, 480, 966, 2016, 3360, 5616, 8550, 13200, 17832, 26208, 34566, 45840, 59520, 78336, 95526, 123120, 147240, 181776, 219846, 267168, 307488, 372000, 433446, 505440, 580776, 682080, 762150, 892800, 999936, 1138368, 1284486
Offset: 1

Views

Author

Keywords

References

  • T. Brenner, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Table[cnt=0; Do[m={{a, b}, {c, d}}; If[Det[m, Modulus->p] > 0, cnt++ ], {a, 0, p-1}, {b, 0, p-1}, {c, 0, p-1}, {d, 0, p-1}]; cnt, {p, 37}] (* T. D. Noe, Jan 12 2006 *)
    f[p_, e_] := p^(2*e - 1)*(p^(e + 1) + p^e - 1); a[1] = 0; a[n_] := n^4 - Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 31 2023 *)
  • PARI
    a(n) = {my(f = factor(n), p, e); n^4 - prod(i = 1, #f~, p = f[i, 1]; e = f[i, 2];  p^(2*e - 1)*(p^(e + 1) + p^e - 1));} \\ Amiram Eldar, Oct 31 2023

Formula

a(n) = n^4 - A020478(n).
For prime n, a(n) = (n^2-1)(n-1)n. - T. D. Noe, Jan 12 2006

Extensions

More terms from T. D. Noe, Jan 12 2006

A005575 a(n) = A259095(2n,n).

Original entry on oeis.org

0, 0, 1, 2, 5, 11, 20, 37, 63, 110, 174, 283, 435, 671, 1001, 1492, 2160, 3127, 4442, 6269, 8739, 12109, 16597, 22618, 30576, 41077, 54834, 72788, 96056, 126131, 164829, 214327, 277534, 357810, 459507, 587779, 749220, 951473, 1204501, 1519691, 1911618, 2397247, 2997985, 3738482, 4649981, 5768457, 7138640, 8812704, 10854735, 13339286
Offset: 1

Views

Author

Keywords

Comments

Computed by R. K. Guy in 1988.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, i, d) option remember; `if`(i*(i+1)/2n, 0, d*b(n-i, i-1, 1))))
        end:
    a:= n-> b(n, n-1, 1):
    seq(a(n), n=1..50);  # Alois P. Heinz, Jul 08 2016
  • Mathematica
    b[n_, i_, d_] := b[n, i, d] = If[i*(i+1)/2 < n, 0, If[n == 0, 1, b[n, i-1, d+1] + If[i > n, 0, d*b[n-i, i-1, 1]]]];
    a[n_] := b[n, n-1, 1];
    Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jul 28 2016, after Alois P. Heinz *)

Extensions

Edited by N. J. A. Sloane, Jun 20 2015
Terms a(25) and beyond from Joerg Arndt, Apr 09 2016

A046937 Triangle read by rows. Same rule as Aitken triangle (A011971) except T(0,0) = 1, T(1,0) = 2.

Original entry on oeis.org

1, 2, 3, 3, 5, 8, 8, 11, 16, 24, 24, 32, 43, 59, 83, 83, 107, 139, 182, 241, 324, 324, 407, 514, 653, 835, 1076, 1400, 1400, 1724, 2131, 2645, 3298, 4133, 5209, 6609, 6609, 8009, 9733, 11864, 14509, 17807, 21940, 27149, 33758
Offset: 0

Views

Author

Keywords

Examples

			Triangle starts:
[0] [   1]
[1] [   2,    3]
[2] [   3,    5,    8]
[3] [   8,   11,   16,    24]
[4] [  24,   32,   43,    59,    83]
[5] [  83,  107,  139,   182,   241,   324]
[6] [ 324,  407,  514,   653,   835,  1076,  1400]
[7] [1400, 1724, 2131,  2645,  3298,  4133,  5209,  6609]
[8] [6609, 8009, 9733, 11864, 14509, 17807, 21940, 27149, 33758]
		

Crossrefs

Borders give A038561.
Cf. A011971.

Programs

  • Haskell
    a046937 n k = a046937_tabl !! n !! k
    a046937_row n = a046937_tabl !! n
    a046937_tabl = [1] : iterate (\row -> scanl (+) (last row) row) [2,3]
    -- Reinhard Zumkeller, Jan 13 2013
  • Maple
    # Compare the analogue algorithm for the Catalan triangle in A350584.
    A046937Triangle := proc(len) local A, P, T, n; A := [2]; P := [1]; T := [[1]];
    for n from 1 to len-1 do P := ListTools:-PartialSums([A[-1], op(P)]);
    A := P; T := [op(T), P] od; T end:
    A046937Triangle(9): ListTools:-Flatten(%); # Peter Luschny, Mar 27 2022
  • Mathematica
    a[0, 0] = 1; a[1, 0] = 2; a[n_, 0] := a[n-1, n-1]; a[n_, k_] := a[n, k] = a[n, k-1] + a[n-1, k-1]; Table[a[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 06 2013 *)

A051488 Numbers k such that phi(k) < phi(k - phi(k)).

Original entry on oeis.org

30, 60, 66, 120, 132, 138, 174, 210, 240, 246, 264, 276, 318, 330, 348, 420, 480, 492, 498, 510, 528, 534, 552, 630, 636, 660, 678, 690, 696, 786, 840, 870, 910, 960, 984, 996, 1020, 1038, 1056, 1068, 1074, 1104, 1122, 1146, 1260, 1272, 1320, 1330, 1356
Offset: 1

Views

Author

Keywords

Comments

If p is a Sophie Germain prime greater than 3 and n is a natural number then 2^n*3*p is in the sequence. That is because if m = 2^n*3*p then phi(m) = 2^n*(p-1) and phi(m - phi(m)) = phi(2^n*3*p - 2^n*(p-1)) = phi(2^n*(2p+1)) = 2^n*p so phi(m) < phi(m-phi(m)) and m is in the sequence. - Farideh Firoozbakht, Jun 19 2005
Erdős (1980) proposed the problem to prove that this sequence is infinite and has an asymptotic density 0. Grytczuk et al. (2001) proved that this sequence is infinite with an upper asymptotic density < 0.45637. - Amiram Eldar, May 22 2021

References

  • Richard K. Guy, Unsolved Problems in Number Theory, 3rd Edition, Springer, 2004, Section B42, p. 150.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter III, p. 209.

Crossrefs

Programs

  • Haskell
    a051488 n = a051488_list !! (n-1)
    a051488_list = [x | x <- [2..], let t = a000010 x, t < a000010 (x - t)]
    -- Reinhard Zumkeller, Apr 12 2014
  • Mathematica
    Select[Range[1360], EulerPhi[ # ] < EulerPhi[ # - EulerPhi[ # ]] &] (* Farideh Firoozbakht, Jun 19 2005 *)

Extensions

More terms from James Sellers

A005168 n-th derivative of x^x at 1, divided by n.

Original entry on oeis.org

1, 1, 1, 2, 2, 9, -6, 118, -568, 4716, -38160, 358126, -3662088, 41073096, -500013528, 6573808200, -92840971200, 1402148010528, -22554146644416, 385014881294496, -6952611764874240, 132427188835260480, -2653529921603890560, 55802195178451990896
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005727.
Column k=2 of A295027 (for n>1), A295028.

Programs

  • Maple
    a:= n-> (n-1)! *coeftayl(x^x, x=1, n):
    seq(a(n), n=1..30);  # Alois P. Heinz, Aug 18 2012
  • Mathematica
    Rest[(NestList[ Factor[ D[ #1, x]] &, x^x, 23] /. (x -> 1))/Range[0, 23]] (* Robert G. Wilson v, Aug 10 2010 *)
  • Python
    from sympy import var, diff
    x = var('x')
    y = x**x
    l = [[y:=diff(y),y.subs(x,1)/(n+1)][1] for n in range(10)]
    print(l) # Nicholas Stefan Georgescu, Mar 02 2023

Extensions

One more term from Robert G. Wilson v, Aug 10 2010

A005576 The limiting sequence [A259095(r(r+1)/2-s,r), s=0,1,2,...,r-1] for very large r.

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 9, 13, 17, 25, 32, 43, 56, 73, 95, 122, 155, 196, 248, 309, 388, 480, 595, 731, 899, 1096, 1338, 1624, 1967, 2373, 2860, 3431, 4111, 4911, 5853, 6963, 8263, 9785, 11565, 13646, 16064, 18884, 22155, 25953, 30349, 35441, 41311, 48098, 55906, 64900, 75231, 87103, 100702, 116296, 134130, 154522
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, i, d) option remember; `if`(i*(i+1)/2n, 0, d*b(n-i, i-1, 1))))
        end:
    a:= n-> b(n*(n-1)/2, n, 1):
    seq(a(n), n=0..55);  # Alois P. Heinz, Jul 08 2016
  • Mathematica
    b[n_, i_, d_] := b[n, i, d] = If[i*(i + 1)/2 < n, 0, If[n == 0, 1, b[n, i - 1, d + 1] + If[i > n, 0, d*b[n - i, i - 1, 1]]]];
    a[n_] := b[n*(n - 1)/2, n, 1];
    Table[a[n], {n, 0, 55}] (* Jean-François Alcover, Jul 28 2016, after Alois P. Heinz *)

Extensions

Edited by N. J. A. Sloane, Jun 20 2015
Terms a(0)..a(11) computed by R. K. Guy
Terms a(12)=56 and beyond from Joerg Arndt, Apr 10 2016

A005577 Maxima of the rows of the triangle A259095.

Original entry on oeis.org

1, 1, 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 20, 27, 35, 44, 56, 73, 91, 115, 148, 186, 227, 283, 358, 435, 538, 671, 813, 1001, 1233, 1492, 1815, 2223, 2673, 3247, 3933, 4713, 5683, 6850, 8170, 9785, 11725, 13948, 16587, 19783, 23468, 27710, 32942, 38956, 45852, 54133, 63879, 75000, 87909, 103471, 121273, 141629
Offset: 1

Views

Author

Keywords

Comments

Computed by R. K. Guy in 1988.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, i, d) option remember; `if`(i*(i+1)/2n, 0, d*b(n-i, i-1, 1))))
        end:
    a:= n-> max(seq(b(n-r, r-1, 1), r=1..n)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Jul 08 2016
  • Mathematica
    b[n_, i_, d_] := b[n, i, d] = If[i*(i+1)/2 < n, 0, If[n == 0, 1, b[n, i-1, d+1] + If[i > n, 0, d*b[n-i, i-1, 1]]]];
    a[n_] := Max[Table[b[n-r, r-1, 1], {r, 1, n}]];
    Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jul 28 2016, after Alois P. Heinz *)

Extensions

Edited by N. J. A. Sloane, Jun 20 2015

A007045 Second (lower) diagonal of partition triangle A047812.

Original entry on oeis.org

0, 1, 5, 20, 51, 112, 221, 411, 720, 1221, 2003, 3206, 5021, 7728, 11698, 17472, 25766, 37580, 54254, 77617, 110087, 154942, 216488, 300456, 414365, 568113, 774571, 1050572, 1417868, 1904641, 2547152, 3392042, 4498948, 5944158, 7824703, 10263932, 13418043, 17484554
Offset: 2

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(n<0
          or t*i b((n-3)*(n+1), n$2):
    seq(a(n), n=2..40);  # Alois P. Heinz, May 31 2020
  • Mathematica
    s[n_] := s[n] = Series[Product[(1 - q^(2*n - k))/(1 - q^(k + 1)), {k, 0, n - 1}], {q, 0, n^2}]; t[n_, k_] := SeriesCoefficient[s[n], k*(n + 1)]; A007045 = Join[{0}, Table[t[n + 3, n], {n, 0, 25}] ] (* Jean-François Alcover, Apr 25 2012 *)
  • PARI
    T(n, k) = polcoeff(prod(j=0, n-1, (1-q^(2*n-j))/(1-q^(j+1)) ), k*(n+1) );
    for(n=3, 33, print1(T(n, n-3), ", ")) \\ Petros Hadjicostas, May 31 2020

A061776 Start with a single triangle; at n-th generation add a triangle at each vertex, allowing triangles to overlap; sequence gives number of triangles in n-th generation.

Original entry on oeis.org

1, 3, 6, 12, 18, 30, 42, 66, 90, 138, 186, 282, 378, 570, 762, 1146, 1530, 2298, 3066, 4602, 6138, 9210, 12282, 18426, 24570, 36858, 49146, 73722, 98298, 147450, 196602, 294906, 393210, 589818, 786426, 1179642, 1572858, 2359290, 3145722, 4718586, 6291450
Offset: 0

Views

Author

N. J. A. Sloane, R. K. Guy, Jun 23 2001

Keywords

Comments

Number of 3-colorings of the (n,2)-Turán graph. - Alois P. Heinz, Jun 07 2024

References

  • R. Reed, The Lemming Simulation Problem, Mathematics in School, 3 (#6, Nov. 1974), front cover and pp. 5-6.

Crossrefs

A061777 gives total population of triangles at n-th generation.
Cf. A266972.

Programs

  • Maple
    A061776 := proc(n) if n mod 2 = 0 then 6*(2^(n/2)-1); else 3*(2^((n-1)/2)-1)+3*(2^((n+1)/2)-1); fi; end; # for n >= 1
  • Mathematica
    a[0]=1; a[n_/;EvenQ[n]]:=6*(2^(n/2)-1); a[n_/;OddQ[n]] := 3*(2^((n-1)/2)-1) + 3*(2^((n+1)/2)-1); a /@ Range[0, 37] (* Jean-François Alcover, Apr 22 2011, after Maple program *)
    CoefficientList[Series[(1 + 2 x) (1 + x^2) / ((1 - x) (1 - 2 x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 19 2013 *)
    LinearRecurrence[{1,2,-2},{1,3,6,12},40] (* Harvey P. Dale, Mar 27 2019 *)
  • PARI
    a(n)=([0,1,0; 0,0,1; -2,2,1]^n*[1;3;6])[1,1] \\ Charles R Greathouse IV, Feb 19 2017

Formula

Explicit formula given in Maple line.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3) for n>3. G.f.: (1+2*x)*(1+x^2)/((1-x)*(1-2*x^2)). - Colin Barker, May 08 2012
a(n) = 3*A027383(n-1) for n>0, a(0)=1. - Bruno Berselli, May 08 2012

A064164 EHS numbers: k such that there is a prime p satisfying k! + 1 == 0 (mod p) and p !== 1 (mod k).

Original entry on oeis.org

8, 9, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 26, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85
Offset: 1

Views

Author

R. K. Guy, Sep 20 2001

Keywords

Comments

The complement of this sequence (A064295) is a superset of A002981, that is, terms of A002981 do not appear in this sequence.
Hardy & Subbarao prove that this sequence is infinite, see their Theorem 2.12. - Charles R Greathouse IV, Sep 10 2015

Crossrefs

The smallest associated primes p are given in A064229.

Programs

  • Mathematica
    Do[k = 1; While[p = Prime[k]; k < 10^8 && Not[ Nor[ Mod[n! + 1, p] != 0, Mod[p, n] == 1]], k++ ]; If[k != 10^8, Print[n, " ", p]], {n, 2, 88}]
  • PARI
    is(n)=my(f=factor(n!+1)[,1]); for(i=1,#f, if(f[i]%n != 1, return(n>1))); 0 \\ Charles R Greathouse IV, Sep 10 2015

Extensions

Corrected and extended by Don Reble, Sep 23 2001
Previous Showing 61-70 of 79 results. Next