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

A002282 a(n) = 8*(10^n - 1)/9.

Original entry on oeis.org

0, 8, 88, 888, 8888, 88888, 888888, 8888888, 88888888, 888888888, 8888888888, 88888888888, 888888888888, 8888888888888, 88888888888888, 888888888888888, 8888888888888888, 88888888888888888, 888888888888888888, 8888888888888888888, 88888888888888888888, 888888888888888888888
Offset: 0

Views

Author

Keywords

Comments

If the initial term is omitted, might be called eightful (or hateful) numbers!

Examples

			Curious multiplications:
9*9 + 7 = 88;
98*9 + 6 = 888;
987*9 + 5 = 8888;
9876*9 + 4 = 88888;
98765*9 + 3 = 888888;
987654*9 + 2 = 8888888;
9876543*9 + 1 = 88888888;
98765432*9 + 0 = 888888888;
987654321*9 - 1 = 8888888888;
9876543210*9 - 2 = 88888888888. - _Philippe Deléham_, Mar 09 2014
		

References

  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 32.

Crossrefs

Programs

  • Maple
    A002282:=n->8*(10^n - 1)/9; seq(A002282(n), n=0..20); # Wesley Ivan Hurt, Mar 10 2014
  • Mathematica
    LinearRecurrence[{11,-10}, {0,8}, 20] (* Harvey P. Dale, May 30 2013 *)
  • PARI
    { a=-4/5; for (n = 0, 200, a+=8*10^(n - 1); write("b002282.txt", n, " ", a); ) } \\ Harry J. Smith, Jun 27 2009
    
  • Python
    def a(n): return 8*(10**n - 1)//9 # Martin Gergov, Oct 19 2022

Formula

From Jaume Oliver Lafont, Feb 03 2009: (Start)
a(n) = 11*a(n-1) - 10*a(n-2), with a(0)=0, a(1)=8.
G.f.: 8*x/((1-x)*(1-10*x)). (End)
a(n) = A178635(n)/A002283(n). - Reinhard Zumkeller, May 31 2010
a(n) = a(n-1) + 8*10^(n-1), with a(0)=0. - Vincenzo Librandi, Jul 22 2010
a(n) = 8*A002275(n) = A002283(n) - A002275(n). - Carauleanu Marc, Sep 03 2016
From Ilya Gutkovskiy, Sep 03 2016: (Start)
E.g.f.: 8*(exp(9*x) - 1)*exp(x)/9.
a(n) = floor(8*10^n/9). (End)
From Elmo R. Oliveira, Jul 20 2025: (Start)
a(n) = (A246058(n) - 1)/2.
a(n) = A010785(A017257(n-1)) for n >= 1. (End)

A131645 Beastly primes (version 2): primes containing 666 as a substring.

Original entry on oeis.org

6661, 16661, 26669, 46663, 56663, 66601, 66617, 66629, 66643, 66653, 66683, 66697, 76667, 96661, 96667, 106661, 106663, 106669, 116663, 146669, 166601, 166603, 166609, 166613, 166619, 166627, 166631, 166643, 166657, 166667, 166669, 166679
Offset: 1

Views

Author

Tanya Khovanova, Sep 08 2007

Keywords

Comments

These are the primes among the beastly numbers A051003.
There are several other definitions of beastly primes (see cross-references).
Asymptotic density n/log(n), since almost all primes are of this form.

Crossrefs

Programs

  • Mathematica
    Select[Range[300000], StringFreeQ[ToString[ # ], "666"] == False && PrimeQ[ # ] &]
    Select[Prime[Range[300000]],!StringFreeQ[ToString[ # ],"666"]&] (* Zak Seidov, Jan 09 2009 *)
  • PARI
    digitsIn(x) = 1 + log(x)\log(10)
    allocatemem(932245000);
    default(primelimit, 4294965247); m=1; forprime (p=6660, 68466670, d=digitsIn(p); for (i=1, d-3, t=10^i; u=p\t; x=u-(u\1000)*1000; if (x==666, print(m, " ", p); write("b131645.txt", m, " ", p); m++; break))) \\ Harry J. Smith, Jan 11 2009

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Oct 13 2015

Extensions

Definition corrected by Arkadiusz Wesolowski, Feb 12 2011
Edited by N. J. A. Sloane, Feb 12 2011

A186086 Beastly primes (version 1): either 666 followed by 0's and a 1 or 7 at the right end or a palindrome with 666 in the center, 0's surrounding these digits, and 1 or 7 at both ends.

Original entry on oeis.org

6661, 16661, 66601, 76667, 700666007, 6660000000001, 666000000000001, 700000666000007, 70000006660000007, 6660000000000000000000000007, 66600000000000000000000000007, 1000000000000066600000000000001
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 12 2011

Keywords

Comments

Differs from A131645 in that 26669, 46663, 56663, 66617, 66629, 66643, 66653, 66683, 66697, 96661, 96667, 106661, 106663, 106669, 116663, 146669, 166601, 166603, 166609, 166613, 166619, 166627, 166631, 166643, 166657, 166667, 166669, 166679, are not included here.
76667 is the largest beastly prime that does not contain the digit "0".

Crossrefs

Programs

  • Mathematica
    e = 14; p = 666*10^n + 1; q = (10^(n + 2) + 666)*10^n + 1; Select[Union[Table[p, {n, 2*e}], Table[p + 6, {n, 2*e}], Table[q, {n, e}], Table[q + 6*10^(2*n + 2) + 6, {n, e}]], PrimeQ] (* Arkadiusz Wesolowski, Sep 21 2011 *)
    Module[{nn=35,bp1,bp2,bp3,bp4}, bp1=FromDigits/@ Table[Join[PadRight[ {6,6,6},n1,0],{1}],{n1,3,nn}]; bp2=FromDigits/@ Table[Join[ PadRight[ {6,6,6},n2,0],{7}], {n2,3,nn}]; bp3=FromDigits/@ Table[Join[PadRight[ {1},n3,0], {6,6,6},PadLeft[ {1},n3,0]],{n3,1,nn/2}];bp4=FromDigits/@ Table[Join[PadRight[{7},n3,0],{6,6,6}, PadLeft[ {7},n3,0]],{n3,1,nn/2}]; Select[Sort[Join[bp1,bp2,bp3,bp4]],PrimeQ]] (* Harvey P. Dale, Jan 18 2017 *)

Extensions

Edited by N. J. A. Sloane, Feb 12 2011
a(10)-a(12) from Charles R Greathouse IV, Feb 12 2011

A046720 Subsequence of beastly primes (A186086) that are palindromes that begin and end with 7.

Original entry on oeis.org

76667, 700666007, 700000666000007, 70000006660000007
Offset: 1

Views

Author

Keywords

Comments

Next term is 7_{0}^48_666_{0}^48_7, containing 101 digits, and is too large to include here.
The number of digits in the terms is 2*A186521(n)+3: 5, 9, 15, 17, 101, 1159, 1589, 2647, 2787, 4787, 6135, 26961 (some correspond to probable primes). - Jens Kruse Andersen, Jul 13 2014

Crossrefs

Programs

  • Mathematica
    Select[Table[(7*10^(n + 2) + 666)*10^n + 7, {n, 7}], PrimeQ] (* Arkadiusz Wesolowski, Sep 08 2011 *)
    Select[Table[With[{s=PadRight[{7},n,0]},FromDigits[Join[s,{6,6,6},Reverse[s]]]],{n,8}],PrimeQ] (* Harvey P. Dale, Aug 05 2024 *)

Formula

a(n) = (7*10^(k+2)+666)*10^k+7, where k = A186521(n). - Jens Kruse Andersen, Jul 13 2014

Extensions

Definition revised by N. J. A. Sloane, Feb 14 2011

A138563 Beastly fax numbers: numbers containing the fax number of the Beast (667, one more than its regular number) in their decimal expansion.

Original entry on oeis.org

667, 1667, 2667, 3667, 4667, 5667, 6667, 6670, 6671, 6672, 6673, 6674, 6675, 6676, 6677, 6678, 6679, 7667, 8667, 9667, 10667, 11667, 12667, 13667, 14667, 15667, 16667, 16670, 16671, 16672, 16673, 16674, 16675, 16676, 16677, 16678
Offset: 1

Views

Author

N. J. A. Sloane, May 13 2007

Keywords

Comments

The sum of the reciprocals of numbers not in this sequence is convergent. - Adam P. Goucher, Apr 27 2014

Crossrefs

Cf. A051003.

Programs

  • Mathematica
    Select[Range[20000], StringContainsQ[ToString[#], "667"] &] (* Amiram Eldar, Jun 28 2024 *)

Formula

a(n) ~ n. - Charles R Greathouse IV, Oct 25 2014
Sum_{k>=1, k is not a term} 1/k = 2301.846622336249707557560554200194249235044868457872023381489896767824372028... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Jun 28 2024

A098783 Smallest integer not occurring earlier such that the concatenation of the integers has the property that the first two digits sum to 9, the next two digits also, etc.

Original entry on oeis.org

0, 9, 1, 8, 2, 7, 3, 6, 4, 5, 18, 27, 36, 45, 54, 63, 72, 81, 90, 180, 91, 80, 92, 70, 93, 60, 94, 50, 95, 40, 96, 30, 97, 20, 98, 10, 909, 181, 82, 71, 83, 61, 84, 51, 85, 41, 86, 31, 87, 21, 88, 11, 809, 182, 73, 62, 74, 52, 75, 42, 76, 32, 77, 22, 78, 12, 709, 183, 64, 53, 65
Offset: 0

Views

Author

Eric Angelini, Oct 04 2004

Keywords

Comments

This sequence contains no beastly numbers (A051003). - Rémy Sigrist, Dec 31 2017

Examples

			When parenthesis are added one can see the successive pairs of digits with sum 9: (0, 9), (1, 8), (2, 7), (3, 6), (4, 5), (18), (27), (36), (45), (54), (63), (72), (81), (90), (18)(0, 9)(1, ... - _Eric Angelini_, Dec 18 2017
		

Crossrefs

Cf. A051003.

A244661 Beastly reciprocals, or numbers n such that digitsum(1/n) = 666.

Original entry on oeis.org

149, 298, 596, 646, 745, 1192, 1490, 1615, 2119, 2584, 2980, 3109, 3725, 3878, 5960, 6218, 6357, 6460, 7106, 7294, 7450, 8476, 9262, 9868, 10941, 11627, 11634, 11920, 12436, 14535, 14900, 15049, 15545, 16150, 18625, 21190, 22718, 23256, 23902, 24872, 24915
Offset: 1

Views

Author

Anthony Sand, Jul 04 2014

Keywords

Comments

149 is a full reptend prime (see A001913), hence the sum of the decimal digits of 1/149 is 9 * 148 / 2 = 666.
From Robert G. Wilson v, Aug 16 2014: (Start)
If n is present, so is 10n.
If n is present then A003592*n is possibly present.
Primitives are: 149, 646, 1615, 2119, 3109, 3878, 7294, 9262, 9868, 10941, …, .
Palindromes: 646, 1525251, 2062602, …, .
Primes: 149, 3109, 111149, 351391, …, .
(End)

Examples

			If digitsum(1/n) sums the decimal digits of 1/n up to the point at which they recur or terminate, then digitsum(1/149) = 666 = 0 + 0 + 6 + 7 + 1 + 1 + 4 + 0 + 9 + 3 + 9 + 5 + 9 + 7 + 3 + 1 + 5 + 4 + 3 + 6 + 2 + 4 + 1 + 6 + 1 + 0 + 7 + 3 + 8 + 2 + 5 + 5 + 0 + 3 + 3 + 5 + 5 + 7 + 0 + 4 + 6 + 9 + 7 + 9 + 8 + 6 + 5 + 7 + 7 + 1 + 8 + 1 + 2 + 0 + 8 + 0 + 5 + 3 + 6 + 9 + 1 + 2 + 7 + 5 + 1 + 6 + 7 + 7 + 8 + 5 + 2 + 3 + 4 + 8 + 9 + 9 + 3 + 2 + 8 + 8 + 5 + 9 + 0 + 6 + 0 + 4 + 0 + 2 + 6 + 8 + 4 + 5 + 6 + 3 + 7 + 5 + 8 + 3 + 8 + 9 + 2 + 6 + 1 + 7 + 4 + 4 + 9 + 6 + 6 + 4 + 4 + 2 + 9 + 5 + 3 + 0 + 2 + 0 + 1 + 3 + 4 + 2 + 2 + 8 + 1 + 8 + 7 + 9 + 1 + 9 + 4 + 6 + 3 + 0 + 8 + 7 + 2 + 4 + 8 + 3 + 2 + 2 + 1 + 4 + 7 + 6 + 5 + 1.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Total[ RealDigits[ 1/n, 10][[1, 1]]] == 666;  Select[ Range@ 25000, fQ ] (* Robert G. Wilson v, Aug 16 2014 *)

A248504 Least number k > 0 such that n^k contains 666 in its decimal representation, or 0 if no such k exists.

Original entry on oeis.org

0, 157, 34, 96, 102, 18, 70, 64, 17, 0, 42, 41, 25, 44, 30, 48, 16, 97, 30, 157, 50, 33, 15, 35, 51, 12, 35, 10, 34, 34, 34, 44, 44, 30, 47, 9, 20, 46, 23, 96, 33, 13, 42, 32, 39, 17, 8, 27, 35, 102, 22, 42, 80, 55, 28, 55, 38, 19, 48, 18, 74, 15, 31, 32, 37
Offset: 1

Views

Author

Talha Ali, Dec 01 2014

Keywords

Comments

a(n) <= a(2) = 157 for all n <= 10^5. Is there any n for which a(n) > 157? - Robert Israel, Dec 01 2014

Examples

			a(2)=157 because 2^157=182687704666362864775460604089535377456991567872 contains '666' (see A007356).
a(3)=34 because 3^34=16677181699666568 contains '666' and belongs to A051003.
		

Crossrefs

Programs

  • Maple
    f:= proc(n)
    local k;
    if n = 10^ilog10(n) then return 0 fi;
    for k from 1 do
      if StringTools[Search]("666",sprintf("%d",n^k)) <> 0 then return k fi
    od
    end proc;
    seq(f(n), n=1..1000); # Robert Israel, Dec 01 2014
  • Mathematica
    A248504[n_] := If[IntegerQ[Log10[n]], 0, Block[{k = 0}, While[StringFreeQ[IntegerString[n^++k], "666"]]; k]];
    Array[A248504, 100] (* Paolo Xausa, Apr 08 2024 *)
  • PARI
    isok(n) = {d = digits(n); for (i=1, #d-3, if ((d[i] == 6) && (d[i+1]==6) && (d[i+2]==6), return(1));); return (0);}
    a(n) = {if ((n==1) || (n==10) || (ispower(n,,&p) && (p==10)), return(0)); k = 1; while (! isok(n^k), k++); k;} \\ Michel Marcus, Dec 01 2014

Extensions

More terms from Alois P. Heinz, Dec 01 2014

A260312 Palindromic beastly primes that begin and end with digit '1'.

Original entry on oeis.org

16661, 1000000000000066600000000000001, 10000000000000000000000000000000000000000006660000000000000000000000000000000000000000001
Offset: 1

Views

Author

K. D. Bajpai, Jul 22 2015

Keywords

Comments

The next term a(4) contains 1017 digits, and is too large to include in data section.

Examples

			a(1) = 16661 is a palindromic prime that contains the beastly number '666' and begins and ends with digit 1.
a(2) = 1000000000000066600000000000001 is palindromic prime that contains the beastly number '666' and begins and ends with digit 1.
		

Crossrefs

Programs

  • Magma
    [k: n in [1..1000] | IsPrime(k) where k is ((1*10^(n + 2) + 666)*10^n + 1 )];
  • Maple
    A260312:= n-> ((1*10^(n + 2) + 666)*10^n + 1 ): select(isprime, [seq((A260312 (n), n=1..100))]);
  • Mathematica
    Select[Table[(1*10^(n + 2) + 666)*10^n + 1, {n, 1000}], PrimeQ]
    Select[Table[FromDigits[Join[{1},PadRight[{},n,0],{6,6,6},PadRight[ {},n,0],{1}]],{n,0,50}],PrimeQ] (* Harvey P. Dale, Jul 09 2017 *)
  • PARI
    for(n=1, 500, k=((1*10^(n + 2) + 666)*10^n + 1 ); if(isprime(k), print1(k, ", ")));
    

A276563 Digits of the Leviathan number (10^666)!.

Original entry on oeis.org

1, 3, 4, 0, 7, 2, 7, 3, 8, 4, 6, 9, 7, 8, 7, 1, 2, 5, 0, 8, 0, 5, 6, 9, 8, 3, 7, 5, 4, 0, 5, 0, 8, 2, 5, 8, 2, 6, 8, 0, 5, 0, 6, 4, 2, 7, 0, 6, 7, 0, 4, 9, 6, 3, 5, 6, 6, 7, 9, 5, 8, 5, 6, 0, 1, 5, 6, 2, 0, 6, 5, 9, 2, 1, 4, 8, 3, 3, 1, 9, 3, 8, 2, 6, 9, 9, 6
Offset: 1

Views

Author

Martin Renner, Nov 16 2016

Keywords

Comments

The factorial of 10^666, called the Leviathan number by Clifford A. Pickover, is 10^(6.655657055...*10^668), which means that it has approximately 6.656*10^668 decimal digits. The number of trailing zeros is Sum_{k=1..952} floor(10^666/5^k) = 25*10^664 - 143. The last nonzero digits are ...708672.

References

  • Clifford A. Pickover: Wonders of Numbers. Adventures in Mathematics, Mind, and Meaning. New York: Oxford University Press, 2001, p. 351.

Crossrefs

Cf. A051003.
Showing 1-10 of 12 results. Next