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

A107893 Triangle read by rows, related to A055129 (repunits in base k).

Original entry on oeis.org

1, 2, 1, 3, 4, 2, 4, 11, 14, 6, 5, 26, 64, 66, 24, 6, 57, 244, 456, 384, 120, 7, 120, 846, 2556, 3744, 2640, 720, 8, 247, 2778, 12762, 28944, 34560, 20880, 5040, 9, 502, 8828, 59382, 195768, 352080, 353520, 186480, 40320, 10, 1013, 27488, 264012, 1216368, 3091320, 4587120, 3966480, 1854720, 362880
Offset: 1

Views

Author

Gary W. Adamson, May 26 2005

Keywords

Comments

Second column of A107893 = Eulerian numbers (A000295) starting with 1: 1, 4, 11, 26, 57, ... Rightmost term in row n = (n-1)!.
Using the Jun 18 2009 formula of Johannes W. Meijer in A028246: Instead of a(n,1)=1 set a(n,1)=n. The result is A107893. - Werner Schulte, Dec 12 2016

Examples

			Binomial transform of Row 4 in the form: (4, 11, 14, 6, 0, 0, 0, ...) = Row 4 of A055129: 4, 15, 40, 85, ... which is generated from f(x) = x^3 + x^2 + x + 1; (x = 1,2,3, ...).
Triangle starts:
  1;
  2,   1;
  3,   4,   2;
  4,  11,  14,   6;
  5,  26,  64,  66,  24;
  6,  57, 244, 456, 384, 120;
  ...
		

Crossrefs

Programs

Formula

n-th row = inverse binomial transform of n-th column of A055129, where the latter are generated from f(x) = x^(n-1) + x^(n-2) + ...+ x + 1; (x = 1, 2, 3, ...)
A(n,k) = Sum_{i=1..n} A028246(i,k) for 1 <= k <= n. - Werner Schulte, Dec 08 2016
The polynomials p(n,t) = Sum_{k=1..n} A(n,k)*t^k are given by p(1,t) = t and p(n+1,t) = t + t*(t+1)*(d/dt)p(n,t) for n >= 1. - Werner Schulte, Dec 12 2016

A053698 a(n) = n^3 + n^2 + n + 1.

Original entry on oeis.org

1, 4, 15, 40, 85, 156, 259, 400, 585, 820, 1111, 1464, 1885, 2380, 2955, 3616, 4369, 5220, 6175, 7240, 8421, 9724, 11155, 12720, 14425, 16276, 18279, 20440, 22765, 25260, 27931, 30784, 33825, 37060, 40495, 44136, 47989, 52060, 56355, 60880
Offset: 0

Views

Author

Henry Bottomley, Mar 23 2000

Keywords

Comments

a(n) = 1111 in base n.
n^3 + n^2 + n + 1 = (n^2 + 1)*(n + 1), therefore a(n) is never prime. - Alonso del Arte, Apr 22 2014

Examples

			a(2) = 15 because 2^3 + 2^2 + 2 + 1 = 8 + 4 + 2 + 1 = 15.
a(3) = 40 because 3^3 + 3^2 + 3 + 1 = 27 + 9 + 3 + 1 = 40.
a(4) = 85 because 4^3 + 4^2 + 4 + 1 = 64 + 16 + 4 + 1 = 85.
From _Bruno Berselli_, Jan 02 2017: (Start)
The terms of the sequence are provided by the row sums of the following triangle (see the seventh formula in the previous section):
.   1;
.   3,   1;
.   9,   5,   1;
.  19,  13,   7,   1;
.  33,  25,  17,   9,   1;
.  51,  41,  31,  21,  11,   1;
.  73,  61,  49,  37,  25,  13,  1;
.  99,  85,  71,  57,  43,  29, 15,  1;
. 129, 113,  97,  81,  65,  49, 33, 17,  1;
. 163, 145, 127, 109,  91,  73, 55, 37, 19,  1;
. 201, 181, 161, 141, 121, 101, 81, 61, 41, 21, 1;
...
Columns from the first to the fifth, respectively: A058331, A001844, A056220 (after -1), A059993, A161532. Also, eighth column is A161549.
(End)
		

Crossrefs

Cf. A237627 (subset of semiprimes).
Cf. A056106 (first differences).

Programs

Formula

For n >= 2, a(n) = (n^4-1)/(n-1) = A024002(n)/A024000(n) = A002522(n)*(n+1) = A002061(n+1) + A000578(n).
G.f.: (1+5*x^2) / (1-x)^4. - Colin Barker, Jan 06 2012
a(n) = -A062158(-n). - Bruno Berselli, Jan 26 2016
a(n) = Sum_{i=0..n} 2*n*(n-i)+1. - Bruno Berselli, Jan 02 2017
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n > 3. - Colin Barker, Jan 02 2017
a(n) = A104878(n+3,n) = A055129(4,n) for n > 0. - Mathew Englander, Jan 06 2021
E.g.f.: exp(x)*(x^3+4*x^2+3*x+1). - Nikolaos Pantelidis, Feb 06 2023

A053699 a(n) = n^4 + n^3 + n^2 + n + 1.

Original entry on oeis.org

1, 5, 31, 121, 341, 781, 1555, 2801, 4681, 7381, 11111, 16105, 22621, 30941, 41371, 54241, 69905, 88741, 111151, 137561, 168421, 204205, 245411, 292561, 346201, 406901, 475255, 551881, 637421, 732541, 837931, 954305, 1082401, 1222981, 1376831, 1544761, 1727605
Offset: 0

Views

Author

Henry Bottomley, Mar 23 2000

Keywords

Comments

a(n) = 11111 in base n.
a(n) = Phi_5(n), where Phi_k is the k-th cyclotomic polynomial.

Crossrefs

5th row of the array A055129.
Cf. A104878.

Programs

Formula

a(n) = n^4 + n^3 + n^2 + n + 1 = (n^5-1)/(n-1).
G.f.: (1 + 16*x^2 + 6*x^3 + x^4)/(1-x)^5. - Colin Barker, Jan 10 2012
E.g.f.: exp(x)*(1 + 4*x + 11*x^2 + 7*x^3 + x^4). - Stefano Spezia, Oct 03 2024
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Aug 05 2025

A053716 a(n) = 1111111 in base n.

Original entry on oeis.org

7, 127, 1093, 5461, 19531, 55987, 137257, 299593, 597871, 1111111, 1948717, 3257437, 5229043, 8108731, 12204241, 17895697, 25646167, 36012943, 49659541, 67368421, 90054427, 118778947, 154764793, 199411801, 254313151, 321272407, 402321277, 499738093
Offset: 1

Views

Author

Henry Bottomley, Mar 23 2000

Keywords

Comments

Evaluation of the seventh cyclotomic polynomial at n. - Joerg Arndt, Aug 27 2015

Examples

			a(3)=1093 because 1111111 base 3=729+243+81+27+9+3+1=121.
		

Crossrefs

7th row of the array A055129.
Cf. A104878.

Programs

  • Magma
    [7] cat [(n^7-1)/(n-1): n in [2..35]]; // Vincenzo Librandi, Feb 08 2014
  • Maple
    A053716 := proc(n)
        numtheory[cyclotomic](7,n) ;
    end proc:
    seq(A053716(n),n=1..20) ; # R. J. Mathar, Feb 07 2014
  • Mathematica
    Table[FromDigits["1111111",n],{n,1,30}](*or*)Table[n^6+n^5+n^4+n^3+n^2+n+1,{n,1,60}] (* Vladimir Joseph Stephan Orlovsky, Jan 29 2012 *)
    CoefficientList[Series[-(x^6 - 6 x^5 + 57 x^4 + 232 x^3 + 351 x^2 + 78 x + 7)/(x - 1)^7, {x, 0, 40}], x] (* Vincenzo Librandi, Feb 08 2014 *)

Formula

a(n) = n^6+n^5+n^4+n^3+n^2+n+1 = (n^7-1)/(n-1).
G.f.: -x*(x^6-6*x^5+57*x^4+232*x^3+351*x^2+78*x+7)/(x-1)^7. - Colin Barker, Oct 29 2012
E.g.f.: exp(x)*(1 + 6*x + 57*x^2 + 122*x^3 + 76*x^4+ 16*x^5 + x^6) - 1. - Stefano Spezia, Oct 03 2024

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

A053700 a(n) = 111111 in base n.

Original entry on oeis.org

6, 63, 364, 1365, 3906, 9331, 19608, 37449, 66430, 111111, 177156, 271453, 402234, 579195, 813616, 1118481, 1508598, 2000719, 2613660, 3368421, 4288306, 5399043, 6728904, 8308825, 10172526, 12356631, 14900788, 17847789, 21243690, 25137931
Offset: 1

Views

Author

Henry Bottomley, Mar 23 2000

Keywords

Examples

			a(3)=364 because 111111 base 3 = 243 + 81 + 27 + 9 + 3 + 1 = 121.
		

Crossrefs

6th row of the array A055129.
Cf. A104878.

Programs

Formula

a(n) = n^5 + n^4 + n^3 + n^2 + n + 1 = (n^6-1)/(n-1).
G.f.: x*(6 + 27*x + 76*x^2 + 6*x^3 + 6*x^4 - x^5)/(1-x)^6. - Colin Barker, May 08 2012
E.g.f.: exp(x)*(1 + 5*x + 26*x^2 + 32*x^3 + 11*x^4+ x^5) - 1. - Stefano Spezia, Oct 03 2024

A066180 a(n) = smallest base b so that repunit (b^prime(n) - 1) / (b - 1) is prime, where prime(n) = n-th prime; or 0 if no such base exists.

Original entry on oeis.org

2, 2, 2, 2, 5, 2, 2, 2, 10, 6, 2, 61, 14, 15, 5, 24, 19, 2, 46, 3, 11, 22, 41, 2, 12, 22, 3, 2, 12, 86, 2, 7, 13, 11, 5, 29, 56, 30, 44, 60, 304, 5, 74, 118, 33, 156, 46, 183, 72, 606, 602, 223, 115, 37, 52, 104, 41, 6, 338, 217, 13, 136, 220, 162, 35, 10, 218, 19, 26, 39
Offset: 1

Views

Author

Frank Ellermann, Dec 15 2001

Keywords

Comments

Is a(n) = 0 possible?
Let p be the n-th prime; Cp(x) be the p-th cyclotomic polynomial (x^p - 1)/(x - 1); a(n) is the least k > 1 such that Cp(k) is prime.
The values associated with a(5) and a(8) through a(70) have been certified prime with Primo. (a(1) through a(4), a(6) and a(7) give prime(2), prime(4), prime(11), prime(31), prime(1028) and prime(12251), respectively.)

Examples

			a(5) = 5 because 11 is the 5th prime; (b^5 - 1)/(b - 1) is composite for b = 2,3,4 and prime ((5^11 - 1)/4 = 12207031) for b = 5.
b = 61 for prime(12) = 37 because (61^37 - 1)/60 is prime and 61 is the least base b that makes (b^37 - 1)/(b - 1) a prime.
		

References

  • Paulo Ribenboim, "The New Book of Prime Numbers Records", Springer, 1996, p. 353.

Crossrefs

Cf. A004023 (prime repunits in base 10), A000043 (prime repunits in base 2, Mersenne primes), A055129 (table of repunits).

Programs

  • Mathematica
    Table[p = Prime[n]; b = 1; While[b++; ! PrimeQ[(b^p - 1)/(b - 1)]]; b, {n, 1, 70}] (* Lei Zhou, Oct 07 2011 *)
  • PARI
    /* This program assumes (probable) primes exist for each n. */
    /* All 70 (probable) primes found by this program have been proved prime. */
    gen_repunit(b,n) = (b^prime(n)-1)/(b-1);
    for(n=1,70, b=1; until(isprime(p), b++; p=gen_repunit(b,n)); print1(b,","));

Formula

a(n) = A085398(prime(n)).

Extensions

Sequence extended to 16 terms by Don Reble, Dec 18 2001
More terms from Rick L. Shepherd, Sep 14 2002
Entry revised by N. J. A. Sloane, Jul 23 2006

A104878 A sum-of-powers number triangle.

Original entry on oeis.org

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

Views

Author

Paul Barry, Mar 28 2005

Keywords

Comments

Columns are partial sums of the columns of A004248. Row sums are A104879. Diagonal sums are A104880.
The rows of this triangle (apart from the initial "1" in each row) are the antidiagonals of rectangle A055129. The diagonals of this triangle (apart from the initial "1") are the rows of rectangle A055129. The columns of this triangle (apart from the leftmost column) are the same as the columns of rectangle A055129 but shifted downward. - Mathew Englander, Dec 21 2020

Examples

			Triangle starts:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  3,  1;
  1,  4,  7,  4,  1;
  1,  5, 15, 13,  5,  1;
  1,  6, 31, 40, 21,  6,  1;
  ...
		

Crossrefs

Cf. A004248 (first differences by column), A104879 (row sums), A104880 (antidiagonal sums), A125118 (version of this triangle with fewer terms).
This triangle (ignoring the leftmost column) is a rotation of rectangle A055129.
T(2n,n) gives A031973.

Programs

  • Maple
    A104878 :=proc(n,k): if k = 0 then 1 elif k=1 then n elif k>=2 then (k^(n-k+1)-1)/(k-1) fi: end: for n from 0 to 7 do seq(A104878(n,k), k=0..n) od; seq(seq(A104878(n,k), k=0..n), n=0..10); # Johannes W. Meijer, Aug 21 2011

Formula

T(n, k) = if(k=1, n, if(k<=n, (k^(n-k+1)-1)/(k-1), 0));
G.f. of column k: x^k/((1-x)(1-k*x)). [corrected by Werner Schulte, Jun 05 2019]
T(n, k) = A069777(n+1,k)/A069777(n,k). [Johannes W. Meijer, Aug 21 2011]
T(n, k) = A055129(n+1-k, k) for n >= k > 0. - Mathew Englander, Dec 19 2020

A119598 Numbers that are repunits in four or more bases.

Original entry on oeis.org

1, 31, 8191
Offset: 1

Views

Author

Sergio Pimentel, Jun 01 2006

Keywords

Comments

Except for first term, numbers which can be represented as a string of three or more 1's in a base >=2 in more than one way; subset of A053696.
No more terms less than 2^44 = 17592186044416. - Ray Chandler, Jun 08 2006
Let the 4-tuple (a,b,m,n) be a solution to the exponential Diophantine equation (a^m-1)/(a-1)=(b^n-1)/(b-1) with a>1, b>a, m>2 and n>2. Then (a^m-1)/(a-1) is in this sequence. The terms 31 and 8191 correspond to the solutions (2,5,5,3) and (2,90,13,3), respectively. No other solutions with n=3 and b<10^5. The Mathematica code finds repunits in increasing order and prints solutions. - T. D. Noe, Jun 07 2006
Following the Goormaghtigh conjecture (Links), 31 and 8191 which are both Mersenne numbers, are the only primes which are Brazilian in two different bases. - Bernard Schott, Jun 25 2013

Examples

			a(1)=1 is a repunit in every base. a(2)=31 is a repunit in bases 1, 2, 5 and 30. a(3)=8191 is a repunit in bases 1, 2, 90 and 8190.
31 and 8191 are Brazilian numbers in two different bases:
31 = 11111_2 = 111_5,
8191 = 1111111111111_2 = 111_90.
		

Crossrefs

Cf. A053696 (numbers of the form (b^k-1)/(b-1)).
Cf. A145461: bases 5 and 90 are 2 exceptions (Goormaghtigh's conjecture).
Cf. A085104 (Brazilian primes).

Programs

  • Mathematica
    fQ[n_] := Block[{d = Rest@Divisors[n - 1]}, Length@d > 2 && Length@Select[IntegerDigits[n, d], Union@# == {1} &] > 2]; Do[ If[ fQ@n, Print@n], {n, 10^8/3}] (* Robert G. Wilson v *)
    nn=1000; pow=Table[3, {nn}]; t=Table[If[n==1, Infinity, (n^3-1)/(n-1)], {n,nn}]; While[pos=Flatten[Position[t,Min[t]]]; !MemberQ[pos,nn], If[Length[pos]>1, Print[{pos,pow[[pos]],t[[pos[[1]]]]}]]; Do[n=pos[[i]]; pow[[n]]++; t[[n]]=(n^pow[[n]]-1)/(n-1), {i,Length[pos]}]] (* T. D. Noe, Jun 07 2006 *)
  • Python
    def isrep(n, b):
      while n >= b:
        n, r = divmod(n, b)
        if r != 1: return False
      return n == 1
    def agen():
      yield 1
      n = 2
      while True:
        reps = 2 # n is a repunit in bases 1 and n-1
        for b in range(2, n-1):
          if isrep(n, b): reps += 1
          if reps == 4: yield n; break
        n += 1
    for m in agen(): print(m) # Michael S. Branicky, Jan 31 2021

Extensions

Edited by Ray Chandler, Jun 08 2006
Showing 1-10 of 18 results. Next