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 11-20 of 37 results. Next

A002281 a(n) = 7*(10^n - 1)/9.

Original entry on oeis.org

0, 7, 77, 777, 7777, 77777, 777777, 7777777, 77777777, 777777777, 7777777777, 77777777777, 777777777777, 7777777777777, 77777777777777, 777777777777777, 7777777777777777, 77777777777777777, 777777777777777777, 7777777777777777777, 77777777777777777777, 777777777777777777777
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A178634(n)/A002283(n). - Reinhard Zumkeller, May 31 2010
From Vincenzo Librandi, Jul 22 2010: (Start)
a(n) = a(n-1) + 7*10^(n-1) with n>0, a(0)=0.
a(n) = 11*a(n-1) - 10*a(n-2) with n>1, a(0)=0, a(1)=7. (End)
G.f.: 7*x/((x-1)*(10*x-1)). - Colin Barker, Jan 24 2013
a(n) = 7*A002275(n). - Wesley Ivan Hurt, Mar 24 2015
E.g.f.: 7*exp(x)*(exp(9*x) - 1)/9. - Stefano Spezia, Sep 13 2023
From Elmo R. Oliveira, Jul 20 2025: (Start)
a(n) = (A099915(n) - 1)/2.
a(n) = A010785(A017245(n-1)) for n >= 1. (End)

A002278 a(n) = 4*(10^n - 1)/9.

Original entry on oeis.org

0, 4, 44, 444, 4444, 44444, 444444, 4444444, 44444444, 444444444, 4444444444, 44444444444, 444444444444, 4444444444444, 44444444444444, 444444444444444, 4444444444444444, 44444444444444444, 444444444444444444, 4444444444444444444, 44444444444444444444, 444444444444444444444
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

a(n) = A075415(n)/A002283(n). - Reinhard Zumkeller, May 31 2010
From Vincenzo Librandi, Jul 22 2010: (Start)
a(n) = a(n-1) + 4*10^(n-1) with a(0)=0;
a(n) = 11*a(n-1) - 10*a(n-2) with a(0)=0, a(1)=4. (End)
G.f.: 4*x/((1 - x)*(1 - 10*x)). - Ilya Gutkovskiy, Feb 24 2017
E.g.f.: 4*exp(x)*(exp(9*x) - 1)/9. - Stefano Spezia, Sep 13 2023
a(n) = A007091(A024049(n)). - Michel Marcus, Jun 16 2024
From Elmo R. Oliveira, Jul 19 2025: (Start)
a(n) = 4*A002275(n).
a(n) = A010785(A017209(n-1)) for n >= 1. (End)

A178631 a(n) = 27*((10^n - 1)/9)^2.

Original entry on oeis.org

27, 3267, 332667, 33326667, 3333266667, 333332666667, 33333326666667, 3333333266666667, 333333332666666667, 33333333326666666667, 3333333333266666666667, 333333333332666666666667, 33333333333326666666666667, 3333333333333266666666666667, 333333333333332666666666666667
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2010

Keywords

Examples

			n=1: ..................... 27 = 9 * 3;
n=2: ................... 3267 = 99 * 33;
n=3: ................. 332667 = 999 * 333;
n=4: ............... 33326667 = 9999 * 3333;
n=5: ............. 3333266667 = 99999 * 33333;
n=6: ........... 333332666667 = 999999 * 333333;
n=7: ......... 33333326666667 = 9999999 * 3333333;
n=8: ....... 3333333266666667 = 99999999 * 33333333;
n=9: ..... 333333332666666667 = 999999999 * 333333333.
		

Crossrefs

Programs

  • Magma
    [27*((10^n-1)/9)^2: n in [1..50]]; // Vincenzo Librandi, Dec 28 2010
    
  • Mathematica
    27*(FromDigits/@Table[PadRight[{},n,1],{n,20}])^2 (* or *) LinearRecurrence[ {111,-1110,1000},{27,3267,332667},20] (* Harvey P. Dale, Oct 11 2012 *)
  • Maxima
    A178631(n):=27*((10^n-1)/9)^2$ makelist(A178631(n),n,1,10); /* Martin Ettl, Nov 12 2012 */
    
  • PARI
    a(n)=27*(10^n\9)^2 \\ Charles R Greathouse IV, Jul 02 2013

Formula

a(n) = 27*A002477(n) = A002283(n)*A002277(n).
a(n) = ((A002277(n-1)*10 + 2)*10^(n-1) + A002280(n-1))*10 + 7.
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>3, a(1)=27, a(2)=3267, a(3)=332667. - Harvey P. Dale, Oct 11 2012
G.f.: 27*x*(1 + 10*x)/((1 - x)*(1 - 10*x)*(1 - 100*x)). - Ilya Gutkovskiy, Feb 24 2017
E.g.f.: exp(x)*(1 - 2*exp(9*x) + exp(99*x))/3. - Elmo R. Oliveira, Aug 01 2025

A178633 a(n) = 54*((10^n - 1)/9)^2.

Original entry on oeis.org

54, 6534, 665334, 66653334, 6666533334, 666665333334, 66666653333334, 6666666533333334, 666666665333333334, 66666666653333333334, 6666666666533333333334, 666666666665333333333334, 66666666666653333333333334, 6666666666666533333333333334, 666666666666665333333333333334
Offset: 1

Views

Author

Reinhard Zumkeller, May 31 2010

Keywords

Examples

			n = 1:                   54 = 9 * 6;
n = 2:                 6534 = 99 * 66;
n = 3:               665334 = 999 * 666;
n = 4:             66653334 = 9999 * 6666;
n = 5:           6666533334 = 99999 * 66666;
n = 6:         666665333334 = 999999 * 666666;
n = 7:       66666653333334 = 9999999 * 6666666;
n = 8:     6666666533333334 = 99999999 * 66666666;
n = 9:   666666665333333334 = 999999999 * 666666666.
		

References

  • Walther Lietzmann, Lustiges und Merkwuerdiges von Zahlen und Formen, (F. Hirt, Breslau 1921-43), p. 149.

Crossrefs

Programs

Formula

a(n) = 54*A002477(n) = A002283(n)*A002280(n).
a(n) = ((A002280(n-1)*10 + 5)*10^(n-1) + A002277(n-1))*10 + 4 = (2/3)*(10^n - 1)^2.
From Colin Barker, Dec 07 2015: (Start)
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n>3.
G.f.: 54*x*(1+10*x)/((1-x)*(1-10*x)*(1-100*x)). (End)
E.g.f.: 2*exp(x)*(1 - 2*exp(9*x) + exp(99*x))/3. - Elmo R. Oliveira, Aug 01 2025

A256340 Numbers which have only digits 7 and 8 in base 10.

Original entry on oeis.org

7, 8, 77, 78, 87, 88, 777, 778, 787, 788, 877, 878, 887, 888, 7777, 7778, 7787, 7788, 7877, 7878, 7887, 7888, 8777, 8778, 8787, 8788, 8877, 8878, 8887, 8888, 77777, 77778, 77787, 77788, 77877, 77878, 77887, 77888, 78777, 78778, 78787, 78788, 78877, 78878
Offset: 1

Views

Author

M. F. Hasler, Mar 27 2015

Keywords

Crossrefs

Cf. A007088 (digits 0 & 1), A007931 (digits 1 & 2), A032810 (digits 2 & 3), A032834 (digits 3 & 4), A256290 (digits 4 & 5), A256291 (digits 5 & 6), A256292 (digits 6 & 7), A256341 (digits 8 & 9).

Programs

  • Magma
    [n: n in [1..35000] | Set(IntegerToSequence(n, 10)) subset {7, 8}];
    
  • Magma
    [n: n in [1..100000] | Set(Intseq(n)) subset {7,8}]; // Vincenzo Librandi, Aug 19 2016
    
  • Mathematica
    Flatten[Table[FromDigits[#,10]&/@Tuples[{7,8},n],{n,5}]]
  • PARI
    A256340(n)=vector(#n=binary(n+1)[2..-1],i,10^(#n-i))*n~+10^#n\9*7
    
  • Python
    def a(n): return int(bin(n+1)[3:].replace('0', '7').replace('1', '8'))
    print([a(n) for n in range(1, 45)]) # Michael S. Branicky, Jul 08 2021

Formula

a(n) = A007931(n) + A002280(A000523(n+1)) = A256292(n) + A256077(n) etc.

A086066 a(n) = Sum_{d in D(n)} 2^d, where D(n) = set of digits of n in decimal representation.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 3, 2, 6, 10, 18, 34, 66, 130, 258, 514, 5, 6, 4, 12, 20, 36, 68, 132, 260, 516, 9, 10, 12, 8, 24, 40, 72, 136, 264, 520, 17, 18, 20, 24, 16, 48, 80, 144, 272, 528, 33, 34, 36, 40, 48, 32, 96, 160, 288, 544, 65, 66, 68, 72, 80
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 08 2003

Keywords

Comments

For bitwise logical operations AND and OR:
a(m) = (a(m) AND a(n)) iff D(m) is a subset of D(n),
(a(m) AND a(n)) = 0 iff D(m) and D(n) are disjoint,
a(m) = (a(m) OR a(n)) iff D(n) is a subset of D(m),
a(m) = a(n) iff D(m) = D(n);
A086067(n) = A007088(a(n)).
From Reinhard Zumkeller, Sep 18 2009: (Start)
a(A052382(n)) mod 2 = 0; a(A011540(n)) mod 2 = 1;
for n > 0: a(A000004(n))=1, a(A000042(n))=2, a(A011557(n))=3, a(A002276(n))=4, a(A111066(n))=6, a(A002277(n))=8, a(A002278(n))=16, a(A002279(n))=32, a(A002280(n))=64, a(A002281(n))=128, a(A002282(n))=256, a(A002283(n))=512;
a(n) <= 1023. (End)

Examples

			n=242, D(242) = {2,4}: a(242) = 2^2 + 2^4 = 20.
		

Programs

  • Maple
    A086066 := proc(n) local d: if(n=0)then return 1: fi: d:=convert(convert(n,base,10),set): return add(2^d[j],j=1..nops(d)): end: seq(A086066(n),n=0..64); # Nathaniel Johnston, May 31 2011

A332160 a(n) = 6*(10^(2n+1)-1)/9 - 6*10^n.

Original entry on oeis.org

0, 606, 66066, 6660666, 666606666, 66666066666, 6666660666666, 666666606666666, 66666666066666666, 6666666660666666666, 666666666606666666666, 66666666666066666666666, 6666666666660666666666666, 666666666666606666666666666, 66666666666666066666666666666, 6666666666666660666666666666666
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Crossrefs

Cf. A002275 (repunits R_n = (10^n-1)/9), A002280 (6*R_n), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332161 .. A332169 (variants with different middle digit 1, ..., 9).
Cf. A332120 .. A332190 (variants with different repeated digit 2, ..., 9).

Programs

  • Maple
    A332160 := n -> 6*((10^(2*n+1)-1)/9-10^n);
  • Mathematica
    Array[6 ((10^(2 # + 1)-1)/9 - 10^#) &, 15, 0]
  • PARI
    apply( {A332160(n)=(10^(n*2+1)\9-10^n)*6}, [0..15])
    
  • Python
    def A332160(n): return (10**(n*2+1)//9-10**n)*6

Formula

a(n) = 6*A138148(n) = A002280(2n+1) - 6*10^n.
G.f.: 6*x*(101 - 200*x)/((1 - x)(1 - 10*x)(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2.

A332169 a(n) = 6*(10^(2*n+1)-1)/9 + 3*10^n.

Original entry on oeis.org

9, 696, 66966, 6669666, 666696666, 66666966666, 6666669666666, 666666696666666, 66666666966666666, 6666666669666666666, 666666666696666666666, 66666666666966666666666, 6666666666669666666666666, 666666666666696666666666666, 66666666666666966666666666666, 6666666666666669666666666666666
Offset: 0

Views

Author

M. F. Hasler, Feb 09 2020

Keywords

Crossrefs

Cf. A002275 (repunits R_n = (10^n-1)/9), A002280 (6*R_n), A011557 (10^n).
Cf. A138148 (cyclops numbers with binary digits), A002113 (palindromes).
Cf. A332119 .. A332189 (variants with different repeated digit 1, ..., 8).
Cf. A332160 .. A332169 (variants with different middle digit 0, ..., 9).

Programs

  • Maple
    A332169 := n -> 6*(10^(2*n+1)-1)/9+3*10^n;
  • Mathematica
    Array[6 (10^(2 # + 1)-1)/9 + 3*10^# &, 15, 0]
  • PARI
    apply( {A332169(n)=10^(n*2+1)\9*6+3*10^n}, [0..15])
    
  • Python
    def A332169(n): return 10**(n*2+1)//9*6+3*10**n

Formula

a(n) = 6*A138148(n) + 9*10^n = A002280(2n+1) + 3*10^n = 3*A332123(n).
G.f.: (9 - 303*x - 300*x^2)/((1 - x)(1 - 10*x)(1 - 100*x)).
a(n) = 111*a(n-1) - 1110*a(n-2) + 1000*a(n-3) for n > 2.

A073548 Number of Fibonacci numbers F(k), k <= 10^n, which end in 2.

Original entry on oeis.org

1, 6, 66, 666, 6666, 66666, 666666, 6666666, 66666666, 666666666, 6666666666, 66666666666, 666666666666, 6666666666666, 66666666666666, 666666666666666, 6666666666666666, 66666666666666666, 666666666666666666, 6666666666666666666, 66666666666666666666, 666666666666666666666, 6666666666666666666666, 66666666666666666666666
Offset: 1

Views

Author

Shyam Sunder Gupta, Aug 15 2002

Keywords

Examples

			a(2) = 6 because there are 6 Fibonacci numbers up to 10^2 which end in 2.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{11,-10},{1,6,66},30] (* Harvey P. Dale, May 02 2016 *)

Formula

If n>1 then a(n) = (10^n - 10)/15. - Robert Gerbicz, Sep 06 2002
From Paul Barry, Mar 24 2004: (Start)
G.f.: (1-5*x+10*x^2)/((1-x)*(1-10*x)).
a(n) = 2*(10^n - 1)/3 + 0^n (offset 0). (End)
From Elmo R. Oliveira, Jul 21 2025: (Start)
E.g.f.: (9 + 15*x - 10*exp(x) + exp(10*x))/15.
a(n) = 11*a(n-1) - 10*a(n-2) for n > 3.
a(n) = A073551(n)/2. (End)

Extensions

More terms from Robert Gerbicz, Sep 06 2002

A180160 (sum of digits) mod (number of digits) of n in decimal representation.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 15 2010

Keywords

Comments

a(n) = A007953(n) mod A055642(n);
a(A061383(n)) = 0; a(A180157(n)) > 0;
a(repdigits)=0: a(A010785(n))=0: a(A002275(n))=0: a(A002276(n))=0: a(A002277(n))=0: a(A002278(n))=0: a(4(n))=0: a(A002279(n))=0: a(A002280(n))=0: a(A002281(n))=0: a(A002282(n))=0: a(A002283(n))=0;
A123522 gives smallest m such that a(m) = n.

Crossrefs

Programs

  • Mathematica
    A180160[n_] := If[n == 0, 0, Mod[Total[#], Length[#]] & [IntegerDigits[n]]];
    Array[A180160, 100, 0] (* Paolo Xausa, Jun 30 2024 *)
    Join[{0},Table[Mod[Total[IntegerDigits[n]],IntegerLength[n]],{n,110}]] (* Harvey P. Dale, Jul 30 2025 *)
Previous Showing 11-20 of 37 results. Next