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

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

A037205 a(n) = (n+1)^n - 1.

Original entry on oeis.org

0, 1, 8, 63, 624, 7775, 117648, 2097151, 43046720, 999999999, 25937424600, 743008370687, 23298085122480, 793714773254143, 29192926025390624, 1152921504606846975, 48661191875666868480, 2185911559738696531967, 104127350297911241532840, 5242879999999999999999999, 278218429446951548637196400, 15519448971100888972574851071
Offset: 0

Views

Author

Keywords

Comments

For n >= 1, a(n) = order of Fibonacci group F(n+1,n).
The terms, written in base n+1, are n digits of value n. For example, a(4) = 624 = 4444 in base 5. - Marc Morgenegg, Nov 30 2016
For n >= 1, in a square grid of side n, this is the number of ways to populate the grid with 1 X 1 blocks (with at least one block) so that no block falls under the effect of gravity. - Paolo Xausa, Apr 12 2021
For n > 1, (n-1)^2 | a(n). - David A. Corneth, Dec 15 2022

References

  • D. L. Johnson, Presentation of Groups, Cambridge, 1976, p. 182.
  • Richard M. Thomas, The Fibonacci groups revisited, in Groups - St. Andrews 1989, Vol. 2, 445-454, London Math. Soc. Lecture Note Ser., 160, Cambridge Univ. Press, Cambridge, 1991.

Crossrefs

A diagonal of A202624.

Programs

  • Magma
    [(n + 1)^n - 1: n in [0..25]]; // G. C. Greubel, Nov 10 2017
  • Mathematica
    Table[(n + 1)^n - 1, {n, 0, 21}] (* or *)
    Table[If[n < 1, Length@ #, FromDigits[#, n + 1]] &@ ConstantArray[n, n], {n, 0, 21}] (* Michael De Vlieger, Nov 30 2016 *)
  • PARI
    for(n=0,25, print1((n + 1)^n - 1, ", ")) \\ G. C. Greubel, Nov 10 2017
    

Formula

a(n) = A000169(n+1) - 1 = A060072(n+1)*(n-1) = A060073(n+1)*(n-1)^2.
E.g.f.: 1/(exp(LambertW(-x)) - x) - exp(x). - Ilya Gutkovskiy, Nov 30 2016
E.g.f.: -exp(x) - 1/(x + x/LambertW(-x)). - Vaclav Kotesovec, Dec 05 2016
a(n) = Sum_{k=1..n} binomial(n,k)*n^k [from Paolo Xausa's comment]. - Joerg Arndt, Apr 12 2021

Extensions

Revised by N. J. A. Sloane, Dec 30 2011

A060073 a(n) = (n^(n-1)-1)/(n-1)^2.

Original entry on oeis.org

1, 2, 7, 39, 311, 3268, 42799, 672605, 12345679, 259374246, 6140565047, 161792257795, 4696537119847, 148943500129544, 5124095576030431, 190082780764323705, 7563707819165039903, 321380710796022350410, 14523213296398891966759, 695546073617378871592991
Offset: 2

Views

Author

Henry Bottomley, Feb 21 2001

Keywords

Comments

Written in base n, a(n) has n-2 digits and looks like 12345... except that the final digit is n-1 rather than n-2.
Note that 2^m-1 divides a(m+1) = ((m+1)^m-1)/m^2 if and only if m = 2^k-1 with gcd(k,m) = 1. Mersenne numbers M = 2^p-1 such that a(M+1)/(2^M-1) is prime are Mersenne primes 2^3-1 = 7 and 2^7-1 = 127. - Thomas Ordowski, Sep 19 2021

Examples

			a(10) = 999999999/81 = 111111111/9 = 12345679.
		

Crossrefs

Cf. A000142, A037205, A058128, A059522, A060072, A127837 (numbers p such that a(p+1) is prime).

Programs

  • Mathematica
    Table[(n^(n - 1) - 1)/(n - 1)^2, {n, 2, 20}] (* Michael De Vlieger, Oct 28 2021 *)
  • PARI
    a(n) = { (n^(n - 1) - 1)/(n - 1)^2 } \\ Harry J. Smith, Jul 01 2009

Formula

a(n) = A037205(n-1)/(n-1)^2 = A060072(n)/(n-1) = A058128(n)/n = A059522(n)/A000142(n).

A110737 Row sums in A112668.

Original entry on oeis.org

1, 4, 21, 40, 1555, 3906, 299593, 3280, 87381, 435848050, 67546215517, 61035156, 61054982558011, 328114698808274, 76861433640456465, 21523360, 128583032925805678351, 953674316406, 275941052631578947368421, 1743392200
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2005

Keywords

Comments

For all n, a(n) is a term in row n of triangle A125118, and furthermore if n is prime then a(n) = A060072(n+1). - Mathew Englander, Dec 20 2020

Crossrefs

Programs

  • Maple
    A110737 := proc(n) local i,a ; if n = 1 then RETURN(1) ; else a := 2 ; while (1-a^n)/(1-a) mod n <> 0 do a := a+1 ; od ; RETURN( (1-a^n)/(1-a) ) ; fi ; end: for n from 1 to 25 do printf("%d, ",A110737(n)) : od : # R. J. Mathar, Mar 13 2007
  • Mathematica
    Block[{a = {1}, k, s}, Do[k = 2; While[Mod[Set[s, Total@ NestList[# k &, 1, i - 1]], i] != 0, k++]; AppendTo[a, s], {i, 2, 20}]; a] (* Michael De Vlieger, Dec 31 2020 *)

Extensions

More terms from R. J. Mathar, Mar 13 2007

A127837 Numbers k such that ((k+1)^k-1)/k^2 is a prime.

Original entry on oeis.org

2, 3, 5, 17, 4357
Offset: 1

Views

Author

Keywords

Comments

All terms are primes. Corresponding primes of the form ((k+1)^k-1)/k^2 are listed in A128466 = 2, 7, 311, 7563707819165039903, ... .
It seems that if p is in the sequence then the first three numbers k such that k^2 divides (p+1)^k-1 are: 1, p & ((p+1)^p-1)/p. 2 is in the sequence and the first three terms of A127103 are : 1, 2 & ((2+1)^2-1)/2; 3 is in the sequence and the first three terms of A127104 are : 1, 3 & ((3+1)^3-1)/3; 5 is in the sequence and the first three terms of A127106 are : 1, 5 & ((5+1)^5-1)/5.
No other terms below 20000. - Max Alekseyev, Apr 25 2007

Examples

			4357 is in the sequence because (4358^4357-1)/4357^2 is prime.
		

Crossrefs

A128466 Primes of the form ((k+1)^k - 1)/k^2 = A060073(k+1).

Original entry on oeis.org

2, 7, 311, 7563707819165039903
Offset: 1

Views

Author

Alexander Adamchuk, Mar 09 2007

Keywords

Comments

Corresponding numbers k are listed in A127837.
Terms are the primes in A060073.
Next term has 15850 = 1 + floor((4357*log(4358) - 2*log(4357))/log(10)) digits and is too large to include. - M. F. Hasler, May 22 2007

Crossrefs

Programs

  • Mathematica
    Select[Table[((n+1)^n-1)/n^2,{n,500}],PrimeQ]  (* Harvey P. Dale, Apr 30 2011 *)
  • PARI
    A128466(n)=A060073(A127837(n)+1) /* see there. --- or: */ forprime(p=1,10^5,if(ispseudoprime(n=((p+1)^p-1)/p^2),print1(n,", "))); \\ M. F. Hasler, May 22 2007

Formula

a(n) = ((A127837(n) + 1)^A127837(n) - 1) / A127837(n)^2.

A068792 a(n) = (n-1)*n^(n-2) + Sum_{i=1..n} (n-i)*(n^(n-i-1) + n^(n+i-3)).

Original entry on oeis.org

1, 16, 441, 24336, 2418025, 384473664, 89755965649, 28953439105600, 12345678987654321, 6727499948806851600, 4562491230669011577289, 3769449794266138309731600, 3727710895159027432980276121, 4348096581244536814777202995456, 5907679981266292758213173560296225
Offset: 2

Views

Author

Reinhard Zumkeller, Mar 04 2002

Keywords

Comments

a(n) is a palindrome in base n representation for all n.

Examples

			a(8) = 89755965649 = (1234567654321)OCT;
a(10) = 12345678987654321 = A057139(9);
a(16) = 5907679981266292758213173560296225 = (123456789ABC...987654321)HEX.
		

Crossrefs

Programs

  • Magma
    [((n^(n-1) -1)/(n-1))^2: n in [2..30]]; // G. C. Greubel, Aug 16 2022
    
  • Mathematica
    Table[((n^(n-1) -1)/(n-1))^2, {n,2,30}] (* G. C. Greubel, Aug 16 2022 *)
  • Python
    def A068792(n): return ((n**(n-1)-1)//(n-1))**2 # Chai Wah Wu, Mar 18 2024
  • SageMath
    [((n^(n-1) -1)/(n-1))^2 for n in (2..30)] # G. C. Greubel, Aug 16 2022
    

Formula

a(n) = ( (n^(n-1) - 1)/(n-1) )^2.
a(n) = ((A023811(n) - n + 1)/n)*n^(n-1) + A062813(n)/n.
a(n) = A060072(n)^2.

Extensions

More terms from G. C. Greubel, Aug 16 2022

A125598 a(n) = ((n+1)^(n-1) - 1)/n.

Original entry on oeis.org

0, 1, 5, 31, 259, 2801, 37449, 597871, 11111111, 235794769, 5628851293, 149346699503, 4361070182715, 139013933454241, 4803839602528529, 178901440719363487, 7143501829211426575, 304465936543600121441
Offset: 1

Views

Author

Alexander Adamchuk, Nov 26 2006

Keywords

Comments

Odd prime p divides a(p-2).
a(n) is prime for n = {3,4,6,74, ...}; prime terms are {5, 31, 2801, ...}.
a(n) is the (n-1)-th generalized repunit in base (n+1). For example, a(5) = 259 which is 1111 in base 6. - Mathew Englander, Oct 20 2020

Crossrefs

Cf. A000272 (n^(n-2)), A125599.
Cf. other sequences of generalized repunits, such as A125118, A053696, A055129, A060072, A031973, A173468, A023037, A119598, A085104, and A162861.

Programs

  • Magma
    [((n+1)^(n-1) -1)/n: n in [1..25]]; // G. C. Greubel, Aug 15 2022
  • Mathematica
    Table[((n+1)^(n-1)-1)/n, {n,25}]
  • Sage
    [gaussian_binomial(n,1,n+2) for n in range(0,18)] # Zerinvary Lajos, May 31 2009
    

Formula

a(n) = ((n+1)^(n-1) - 1)/n.
a(n) = (A000272(n+1) - 1)/n.
a(2k-1)/(2k+1) = A125599(k) for k>0.
From Mathew Englander, Dec 17 2020: (Start)
a(n) = (A060072(n+1) - A083069(n-1))/2.
For n > 1, a(n) = Sum_{k=0..n-2} (n+1)^k.
For n > 1, a(n) = Sum_{j=0..n-2} n^j*C(n-1,j+1). (End)

A077385 Triangle read by rows in which n-th row contains 2n-1 terms starting from n^0 to n^(n-1) in increasing order and then in decreasing order to n^0.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 9, 3, 1, 1, 4, 16, 64, 16, 4, 1, 1, 5, 25, 125, 625, 125, 25, 5, 1, 1, 6, 36, 216, 1296, 7776, 1296, 216, 36, 6, 1, 1, 7, 49, 343, 2401, 16807, 117649, 16807, 2401, 343, 49, 7, 1, 1, 8, 64, 512, 4096, 32768, 262144, 2097152, 262144, 32768, 4096, 512, 64, 8, 1
Offset: 1

Views

Author

Amarnath Murthy, Nov 06 2002

Keywords

Examples

			Irregular triangle begins as:
  1;
  1, 2,  1;
  1, 3,  9,   3,    1;
  1, 4, 16,  64,   16,     4,      1;
  1, 5, 25, 125,  625,   125,     25,     5,    1;
  1, 6, 36, 216, 1296,  7776,   1296,   216,   36,   6,  1;
  1, 7, 49, 343, 2401, 16807, 117649, 16807, 2401, 343, 49, 7, 1;
		

Crossrefs

Programs

  • Magma
    A077385:= func< n,k | k lt n select n^k else n^(2*n-k-2) >;
    [A077385(n,k): k in [0..2*n-2], n in [1..12]]; // G. C. Greubel, Sep 21 2022
    
  • Maple
    A077385 := proc(n,k) if k < n then n^k ; else n^(2*n-k-2) ; fi ; end: for n from 1 to 10 do for k from 0 to 2*n-2 do printf("%d, ",A077385(n,k)) ; od : od : # R. J. Mathar, Jul 03 2007
  • Mathematica
    Table[Join[n^Range[0,n-1],n^Range[n-2,0,-1]],{n,8}]//Flatten (* Harvey P. Dale, Oct 13 2017 *)
  • SageMath
    def A077385(n,k): return n^k if (kA077385(n,k) for k in (0..2*n-2)] for n in (1..12)]) # G. C. Greubel, Sep 21 2022

Formula

T(n, k) = n^k for k < n, otherwise n^(2*n-k-2), for n >= 1, 0 <= k <= 2*n-2.
From G. C. Greubel, Sep 21 2022: (Start)
T(n, 0) = T(n, 2*n-2) = 1.
T(n, n-1) = A000169(n).
T(n, n) = A000272(n).
T(n, 2*n-2-k) = T(n, k).
Sum_{k=0..n-1} T(n, k) = A023037(n).
Sum_{k=0..n-2} T(n, k) = A060072(n).
Sum_{k=0..2*n-2} T(n, k) = A077386(n) = 2*A060072(n) + A000169(n), n > 1. (End)

Extensions

More terms from R. J. Mathar, Jul 03 2007

A065583 Sum of numbers which in base n have (n-1) distinct nonzero digits.

Original entry on oeis.org

0, 1, 12, 252, 9360, 559800, 49412160, 6039794880, 976299609600, 201599999798400, 51766949513664000, 16177372653293913600, 6044902527410562816000, 2661334524326601925401600, 1363387181797265578297344000, 804077813274862776803112960000, 540880443323184957954046525440000
Offset: 1

Views

Author

Henry Bottomley, Nov 28 2001

Keywords

Examples

			a(4) = 252 since we need to sum the base 4 numbers 123, 132, 213, 231, 312 and 321, i.e. the decimal sum 27+30+39+45+54+57 = 252.
		

Crossrefs

Programs

  • Magma
    [n eq 1 select 0 else Factorial(n)*(n^(n-1)-1)/(2*(n-1)): n in [1..30]]; // G. C. Greubel, Aug 16 2022
    
  • Mathematica
    Table[If[n==1, 0, n!*(n^(n-1) -1)/(2*(n-1))], {n,30}] (* G. C. Greubel, Aug 16 2022 *)
  • SageMath
    [0]+[factorial(n)*(n^(n-1)-1)/(2*(n-1)) for n in (2..30)] # G. C. Greubel, Aug 16 2022

Formula

a(n) = n!*(n^(n-1)-1)/(2*(n-1)) = A001710(n)*A060072(n).

Extensions

More terms from Benoit Cloitre, Jan 31 2002
More terms from G. C. Greubel, Aug 16 2022
Showing 1-10 of 15 results. Next