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 36 results. Next

A273729 Number of n-ary heaps on n levels (i.e., of A023037(n) elements).

Original entry on oeis.org

1, 1, 2, 7484400
Offset: 0

Views

Author

Alois P. Heinz, May 28 2016

Keywords

Comments

a(5), a(6), a(7) have 1774, 31436, 625065 decimal digits, respectively.

Crossrefs

Main diagonal of A273712.
Cf. A023037.

Formula

a(n) = A273712(n,n).

A157323 Primes in A023037.

Original entry on oeis.org

3, 13, 109912203092239643840221, 568972471024107865287021434301977158534824481
Offset: 1

Views

Author

Keywords

Programs

  • Mathematica
    lst={};Do[s=0;Do[s+=n^a,{a,0,n-1}];If[PrimeQ[s],AppendTo[lst,s]],{n,0,2*5!}];lst

A173470 Semiprimes in A023037.

Original entry on oeis.org

85, 781, 137257, 28531167061
Offset: 1

Views

Author

Keywords

Comments

The terms a(5) etc. have at least 63 digits (if they exist), so the pattern of terms does not continue as in A001039. [From R. J. Mathar, Feb 27 2010]

Programs

  • Mathematica
    f1[n_]:=Module[{s=0},Do[s+=n^a,{a,0,n-1}];s]; f2[n_]:=Last/@FactorInteger[n]=={1,1}||Last/@FactorInteger[n]=={2}; Select[Table[f1[n],{n,50}],f2[ # ]&]

A054767 Period of the sequence of Bell numbers A000110 (mod n).

Original entry on oeis.org

1, 3, 13, 12, 781, 39, 137257, 24, 39, 2343, 28531167061, 156, 25239592216021, 411771, 10153, 48, 51702516367896047761, 39, 109912203092239643840221, 9372, 1784341, 85593501183, 949112181811268728834319677753, 312, 3905, 75718776648063, 117, 1647084
Offset: 1

Views

Author

Eric W. Weisstein, Feb 09 2002

Keywords

Comments

For p prime, a(p) divides (p^p-1)/(p-1) = A023037(p), with equality at least for p up to 19.
Wagstaff shows that N(p) = (p^p-1)/(p-1) is the period for all primes p < 102 and for primes p = 113, 163, 167 and 173. For p = 7547, N(p) is a probable prime, which means that this p may have the maximum possible period N(p) also. See A088790. - T. D. Noe, Dec 17 2008

Crossrefs

Cf. A000110, A023037, A214810. A146093-A146122 gives Bell numbers read mod 3 to mod 32.

Programs

  • Mathematica
    (* Warning: this program is just a verification of the existing data
     and should not be used to extend the sequence beyond a(28) *)
    BellMod[k_, m_] := Mod[Sum[Mod[StirlingS2[k, j], m], {j, 1, k}], m];
    BellMod[k_, 1] := BellB[k];
    period[nn_List] := Module[{lgmin=2, lgmax=5, nn1},
       lg=If[Length[nn]<=lgmax, lgmin, lgmax];
       nn1 = nn[[1;;lg]];
       km=Length[nn]-lg;
       Catch[Do[If[nn1==nn[[k;;k+lg-1]], Throw[k-1]];
       If[k==km, Throw[0]], {k, 2, km}]]];
    dd[n_] := SelectFirst[Table[{d, n/d},
         {d, Divisors[n][[2;;-2]]}], GCD@@#==1&];
    a[1]=1;
    a[p_?PrimeQ] := a[p] = (p^p-1)/(p-1);
    a[n_/;n>4 && dd[n]!={}] := With[{g = dd[n]}, LCM[a[g[[1]]], a[g[[2]]]]];
    a[n_/;MemberQ[FactorInteger[n][[All, 2]], 1]] := a[n]=
       With[{pp = Select[FactorInteger[n], #1[[2]] ==1 &][[All, 1]]},
          a[n/Times@@pp]*Times@@a/@pp];
    a[n_/;n>4 && GCD @@ FactorInteger[n][[All, 2]]>1] := a[n]=
       With[{g=GCD @@ FactorInteger[n][[All, 2]]}, n^(1/g)*a[n^(1-1/g)]];
    a[n_] := period[Table[BellMod[k, n], {k, 1, 28}]];
    Table[a[n], {n, 1, 28}] (* Jean-François Alcover, Jul 31 2012, updated May 06 2024 *)

Formula

If gcd(n,m) = 1, a(n*m) = lcm(a(n), a(m)). But the sequence is not in general multiplicative; e.g. a(2) = 3, a(9) = 39 and a(18) = 39. - Franklin T. Adams-Watters, Jun 06 2006
a(2^s) = 3*2^s for s >= 2 (Theorem 6.4 in the Lunnon article). For an odd prime p, if a(p) = (p^p-1)/(p-1) (which is conjectured to hold for all p), then a(p^s) = p^(s-1)*(p^p-1)/(p-1) (Theorem 6.2 in the Lunnon article). - Jianing Song, Jun 18 2025

Extensions

More information from Phil Carmody, Dec 22 2002
Extended by T. D. Noe, Dec 18 2008
a(26) corrected by Jean-François Alcover, Jul 31 2012
a(18) corrected by Charles R Greathouse IV, Jul 31 2012
a(27)-a(28) from Charles R Greathouse IV, Sep 07 2016

A048861 a(n) = n^n - 1.

Original entry on oeis.org

0, 3, 26, 255, 3124, 46655, 823542, 16777215, 387420488, 9999999999, 285311670610, 8916100448255, 302875106592252, 11112006825558015, 437893890380859374, 18446744073709551615, 827240261886336764176, 39346408075296537575423, 1978419655660313589123978
Offset: 1

Views

Author

Charles T. Le (charlestle(AT)yahoo.com)

Keywords

Comments

From Alexander Adamchuk, Jan 22 2007: (Start)
a(n) is divisible by (n-1).
Corresponding quotients are a(n)/(n-1) = {1,3,13,85,781,9331, ...} = A023037(n).
p divides a(p-1) for prime p.
p divides a((p-1)/2) for prime p = {3,11,17,19,41,43,59,67,73,83,89,97,...} = A033200 Primes congruent to {1, 3} mod 8; or, odd primes of form x^2+2*y^2.
p divides a((p-1)/3) for prime p = {61,67,73,103,151,193,271,307,367,...} = A014753 3 and -3 are both cubes (one implies other) mod these primes p=1 mod 6.
p divides a((p-1)/4) for prime p = {5,13,17,29,37,41,53,61,73,...} = A002144 Pythagorean primes: primes of form 4n+1.
p divides a((p-1)/5) for prime p = {31,191,251,271,601,641,761,1091,...}.
p divides a((p-1)/6) for prime p = {7,241,313,337,409,439,607,631,727,751,919,937,...}. (End)
For n > 1, a(n) is largest number that can be represented using n digits in the base-n number system. - Chinmaya Dash, Mar 31 2022

Examples

			For n=3, a(n) = 3^3 - 1 = 27 - 1 = 26. - _Michael B. Porter_, Nov 12 2017
		

References

  • M. Le, Primes in the sequences n^n+1 and n^n-1, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 156-157.

Crossrefs

Programs

Formula

E.g.f.: 1/(1+LambertW(-x)) - exp(x). - Vaclav Kotesovec, Dec 20 2014

Extensions

Extended (and corrected) by Patrick De Geest, Jul 15 1999

A055129 Repunits in different bases: table by antidiagonals of numbers written in base k as a string of n 1's.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 4, 7, 4, 1, 5, 13, 15, 5, 1, 6, 21, 40, 31, 6, 1, 7, 31, 85, 121, 63, 7, 1, 8, 43, 156, 341, 364, 127, 8, 1, 9, 57, 259, 781, 1365, 1093, 255, 9, 1, 10, 73, 400, 1555, 3906, 5461, 3280, 511, 10, 1, 11, 91, 585, 2801, 9331, 19531, 21845, 9841, 1023, 11
Offset: 1

Views

Author

Henry Bottomley, Jun 14 2000

Keywords

Examples

			T(3,5)=31 because 111 base 5 represents 25+5+1=31.
      1       1       1       1       1       1       1
      2       3       4       5       6       7       8
      3       7      13      21      31      43      57
      4      15      40      85     156     259     400
      5      31     121     341     781    1555    2801
      6      63     364    1365    3906    9331   19608
      7     127    1093    5461   19531   55987  137257
Starting with the second column, the q-th column list the numbers that are written as 11...1 in base q. - _John Keith_, Apr 12 2021
		

Crossrefs

Rows include A000012, A000027, A002061, A053698, A053699, A053700. Columns (see recurrence) include A000027, A000225, A003462, A002450, A003463, A003464, A023000, A023001, A002275, A016123, A016125. Diagonals include A023037, A031973. Numbers in the table (apart from the first column and first two rows) are ordered in A053696.

Programs

  • Maple
    A055129 := proc(n,k)
        add(k^j,j=0..n-1) ;
    end proc: # R. J. Mathar, Dec 09 2015
  • Mathematica
    Table[FromDigits[ConstantArray[1, #], k] &[n - k + 1], {n, 11}, {k, n, 1, -1}] // Flatten (* or *)
    Table[If[k == 1, n, (k^# - 1)/(k - 1) &[n - k + 1]], {n, 11}, {k, n, 1, -1}] // Flatten (* Michael De Vlieger, Dec 11 2016 *)

Formula

T(n, k) = (k^n-1)/(k-1) [with T(n, 1) = n] = T(n-1, k)+k^(n-1) = (k+1)*T(n-1, k)-k*T(n-2, k) [with T(0, k) = 0 and T(1, k) = 1].
From Werner Schulte, Aug 29 2021 and Sep 18 2021: (Start)
T(n,k) = 1 + k * T(n-1,k) for k > 0 and n > 1.
Sum_{m=2..n} T(m-1,k)/Product_{i=2..m} T(i,k) = (1 - 1/Product_{i=2..n} T(i,k))/k for k > 0 and n > 1.
Sum_{n > 1} T(n-1,k)/Product_{i=2..n} T(i,k) = 1/k for k > 0.
Sum_{i=1..n} k^(i-1) / (T(i,k) * T(i+1,k)) = T(n,k) / T(n+1,k) for k > 0 and n > 0. (End)

A031973 a(n) = Sum_{k=0..n} n^k.

Original entry on oeis.org

1, 2, 7, 40, 341, 3906, 55987, 960800, 19173961, 435848050, 11111111111, 313842837672, 9726655034461, 328114698808274, 11966776581370171, 469172025408063616, 19676527011956855057, 878942778254232811938, 41660902667961039785743, 2088331858752553232964200
Offset: 0

Views

Author

Keywords

Comments

These are the generalized repunits of length n+1 in base n for all n >= 1: a(n) expressed in base n is 111...111 (n+1 1's): a(1) = 1^0 + 1^1 = 2 = A000042(2), a(2) = 2^0 + 2^1 + 2^2 = 7 = A000225(3), a(3) = 3^0 + 3^1 + 3^2 + 3^3 = 40 = A003462(4), etc., a(10) = 10^0 + 10^1 + 10^2 + ... + 10^9 + 10^10 = 11111111111 = A002275(11), etc. - Rick L. Shepherd, Aug 26 2004
a(n)=the total number of ordered selections of up to n objects from n types with repetitions allowed. Thus for 2 objects a,b there are 7 possible selections: aa,bb,ab,ba,a,b, and the null set. - J. M. Bergot, Mar 26 2014
a(n)=the total number of ordered arrangements of 0,1,2..n objects, with repetitions allowed, selected from n types of objects. - J. M. Bergot, Apr 11 2014

Examples

			a(3) = 3^0 + 3^1 + 3^2 + 3^3 = 40.
		

Crossrefs

Cf. A000042 (unary representations), A000225 (2^n-1: binary repunits shown in decimal), A003462 ((3^n-1)/2: ternary repunits shown in decimal), A002275 ((10^n-1)/9: decimal repunits).
Cf. A104878.

Programs

  • Magma
    [&+[n^k: k in [0..n]]: n in [0..30]]; // Vincenzo Librandi, Apr 18 2011
    
  • Maple
    a:= proc(n) local c, i; c:=1; for i to n do c:= c*n+1 od; c end:
    seq(a(n), n=0..20); # Alois P. Heinz, Aug 15 2013
  • Mathematica
    Join[{1},Table[Total[n^Range[0,n]],{n,20}]] (* Harvey P. Dale, Nov 13 2011 *)
  • PARI
    a(n)=(n^(n+1)-1)/(n-1) \\ Charles R Greathouse IV, Mar 26 2014
  • Sage
    [lucas_number1(n,n,n-1) for n in range(1, 19)] # Zerinvary Lajos, May 16 2009
    

Formula

a(n) = (n^(n+1)-1)/(n-1) = (A007778(n)-1)/(n-1) = A023037(n)+A000312(n) = A031972(n)+1. - Henry Bottomley, Apr 04 2003
a(n) = A125118(n,n-2) for n>2. - Reinhard Zumkeller, Nov 21 2006
a(n) = [x^n] 1/((1 - x)*(1 - n*x)). - Ilya Gutkovskiy, Oct 04 2017
a(n) = A104878(2n,n). - Alois P. Heinz, May 04 2021

A060072 a(n) = (n^(n-1) - 1)/(n-1) for n>1, a(1) = 0.

Original entry on oeis.org

0, 1, 4, 21, 156, 1555, 19608, 299593, 5380840, 111111111, 2593742460, 67546215517, 1941507093540, 61054982558011, 2085209001813616, 76861433640456465, 3041324492229179280, 128583032925805678351, 5784852794328402307380, 275941052631578947368421
Offset: 1

Views

Author

Henry Bottomley, Feb 21 2001

Keywords

Comments

(n-1)-digit repunits in base n written in decimal.

Examples

			a(10)=111111111; i.e., just nine 1's (converted from base 10 to decimal).
		

Crossrefs

Cf. other sequences of generalized repunits, such as A053696, A055129, A031973, A125598, A173468, A023037, A119598, A085104, and A162861.

Programs

  • Magma
    [0] cat [ (n^(n-1) -1)/(n-1) : n in [2..25]]; // G. C. Greubel, Aug 15 2022
    
  • Mathematica
    Join[{0},Array[(#^(#-1)-1)/(#-1)&,20,2]] (* Harvey P. Dale, Jun 04 2013 *)
  • PARI
    a(n) = if (n==1, 0, (n^(n - 1) - 1)/(n - 1)); \\ Harry J. Smith, Jul 01 2009
    
  • SageMath
    [0]+[(n^(n-1) -1)/(n-1) for n in (2..25)] # G. C. Greubel, Aug 15 2022

Formula

a(n+1) = Sum_{k=1..n} n^(k-1)*C(n, k). - Olivier Gérard, Jun 26 2001 [Corrected by Mathew Englander, Dec 15 2020]
a(n) = Sum_{j=2..n} n^(n-j). - Zerinvary Lajos, Sep 11 2006
a(n+1) = A125118(n,n). - Reinhard Zumkeller, Nov 21 2006
a(n) = Integral_{x=1/n..1} 1/x^n dx. - Francesco Daddi, Aug 01 2011
a(n) = A037205(n-1)/(n-1) = A060073(n)*(n-1) = A023037(n) - A000169(n).
a(n) = [x^n] x^2/((1 - x)*(1 - n*x)). - Ilya Gutkovskiy, Oct 04 2017
a(n) = 1 + A228275(n, n-2) for n >= 2. - Mathew Englander, Dec 14 2020

Extensions

Name edited by Michel Marcus, Dec 14 2020

A125118 Triangle read by rows: T(n,k) = value of the n-th repunit in base (k+1) representation, 1<=k<=n.

Original entry on oeis.org

1, 3, 4, 7, 13, 21, 15, 40, 85, 156, 31, 121, 341, 781, 1555, 63, 364, 1365, 3906, 9331, 19608, 127, 1093, 5461, 19531, 55987, 137257, 299593, 255, 3280, 21845, 97656, 335923, 960800, 2396745, 5380840, 511, 9841, 87381, 488281, 2015539, 6725601, 19173961, 48427561, 111111111
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 21 2006

Keywords

Examples

			First 4 rows:
1: [1]_2
2: [11]_2 ........ [11]_3
3: [111]_2 ....... [111]_3 ....... [111]_4
4: [1111]_2 ...... [1111]_3 ...... [1111]_4 ...... [1111]_5
_
1: 1
2: 2+1 ........... 3+1
3: (2+1)*2+1 ..... (3+1)*3+1 ..... (4+1)*4+1
4: ((2+1)*2+1)*2+1 ((3+1)*3+1)*3+1 ((4+1)*4+1)*4+1 ((5+1)*5+1)*5+1.
		

Crossrefs

This triangle shares some features with triangle A104878.
This triangle is a portion of rectangle A055129.
Each term of A110737 comes from the corresponding row of this triangle.
Diagonals (adjusting offset as necessary): A060072, A023037, A031973, A173468.
Cf. A023037, A031973, A125119, A125120 (row sums).

Programs

  • Magma
    [((k+1)^n -1)/k : k in [1..n], n in [1..12]]; // G. C. Greubel, Aug 15 2022
    
  • Mathematica
    Table[((k+1)^n -1)/k, {n, 12}, {k, n}]//Flatten (* G. C. Greubel, Aug 15 2022 *)
  • SageMath
    def A125118(n,k): return ((k+1)^n -1)/k
    flatten([[A125118(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Aug 15 2022

Formula

T(n, k) = Sum_{i=0..n-1} (k+1)^i.
T(n+1, k) = (k+1)*T(n, k) + 1.
Sum_{k=1..n} T(n, k) = A125120(n).
T(2*n-1, n) = A125119(n).
T(n, 1) = A000225(n).
T(n, 2) = A003462(n) for n>1.
T(n, 3) = A002450(n) for n>2.
T(n, 4) = A003463(n) for n>3.
T(n, 5) = A003464(n) for n>4.
T(n, 9) = A002275(n) for n>8.
T(n, n) = A060072(n+1).
T(n, n-1) = A023037(n) for n>1.
T(n, n-2) = A031973(n) for n>2.
T(n, k) = A055129(n, k+1) = A104878(n+k, k+1), 1<=k<=n. - Mathew Englander, Dec 19 2020

A076113 a(n) = n^(n*(n-1)/2).

Original entry on oeis.org

1, 1, 2, 27, 4096, 9765625, 470184984576, 558545864083284007, 19342813113834066795298816, 22528399544939174411840147874772641, 1000000000000000000000000000000000000000000000, 1890591424712781041871514584574319778449301246603238034051
Offset: 0

Views

Author

Amarnath Murthy, Oct 09 2002

Keywords

Comments

Number of labeled commutative idempotent groupoids with n elements. [edited by Michel Marcus, Jul 10 2025]
Product of terms in n-th row of A076112.

Crossrefs

Programs

  • PARI
    a(n) = n^(n*(n-1)/2); \\ Joerg Arndt, Nov 04 2013

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 20 2003
a(0)=1 prepended by Alois P. Heinz, Jun 30 2022
Showing 1-10 of 36 results. Next