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-7 of 7 results.

A371808 Exponents k > 0 of powers of 2 such that the decimal expansion of 2^k contains more than one 666 substring (overlapping substrings are counted as distinct).

Original entry on oeis.org

220, 222, 243, 529, 624, 648, 662, 702, 714, 838, 840, 842, 844, 846, 850, 857, 859, 867, 869, 871, 924, 925, 927, 929, 931, 975, 979, 981, 983, 1056, 1058, 1062, 1088, 1133, 1135, 1160, 1162, 1219, 1230, 1241, 1259, 1310, 1341, 1343, 1349, 1384, 1394, 1411, 1420
Offset: 1

Views

Author

Paolo Xausa, Apr 06 2024

Keywords

Comments

A positive power of 2 containing 666 in its decimal expansion is called an apocalyptic number.
See A371806 for a variant counting only nonoverlapping substrings.

Examples

			243 is a term because 2^243 contains two (overlapping) 666 substrings in its decimal expansion:
.
                   ***
14134776518227074636666380005943348126619871175004951664972849610340958208.
                    ***
		

Crossrefs

Subsequence of A007356.

Programs

  • Mathematica
    Select[Range[2000], StringCount[IntegerString[2^#], "666", Overlaps->True] > 1 &]
  • Python
    def ok(n): return (s:=str(1< 1 or "6666" in s
    print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Apr 07 2024

A371806 Exponents k > 0 of powers of 2 such that the decimal expansion of 2^k contains more than one nonoverlapping 666 substring.

Original entry on oeis.org

220, 222, 529, 624, 648, 702, 714, 844, 846, 850, 859, 924, 925, 929, 931, 979, 981, 983, 1062, 1088, 1133, 1135, 1219, 1230, 1241, 1259, 1310, 1343, 1349, 1384, 1394, 1467, 1472, 1495, 1503, 1524, 1550, 1589, 1627, 1631, 1642, 1652, 1656, 1663, 1679, 1744, 1751
Offset: 1

Views

Author

Paolo Xausa, Apr 06 2024

Keywords

Comments

A positive power of 2 containing 666 in its decimal expansion is called an apocalyptic number.
See A371808 for a variant where overlapping substrings are counted as distinct.

Examples

			220 is a term because 2^220 contains more than one nonoverlapping 666 substring in its decimal expansion:
2^220 = 168499(666)66969149871(666)88442938726917102321526408785780068975640576.
		

Crossrefs

Subsequence of A007356 and of A371808.
Cf. A371807.

Programs

  • Mathematica
    Select[Range[2000], StringCount[IntegerString[2^#], "666"] > 1 &]
  • Python
    def ok(n): return str(1< 1
    print([k for k in range(2000) if ok(k)]) # Michael S. Branicky, Apr 07 2024

A371807 Number of nonoverlapping 666 substrings contained in the decimal expansion of the n-th apocalyptic number.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Apr 06 2024

Keywords

Comments

An apocalyptic number is a positive power of 2 containing 666 in its decimal expansion.
See A371809 for a variant where overlapping substrings are counted as distinct.

Examples

			a(4) = 2 because the 4th apocalyptic number (2^220) contains two nonoverlapping 666 substrings in its decimal expansion:
2^220 = 168499(666)66969149871(666)88442938726917102321526408785780068975640576.
		

Crossrefs

Programs

  • Mathematica
    Select[StringCount[IntegerString[2^Range[1000]], "666"], # > 0 &]
  • Python
    from itertools import islice
    def agen(): # generator of terms
        pow2 = 1
        while True:
            s = str(pow2)
            if (c := s.count("666")) > 0: yield c
            pow2 <<= 1
    print(list(islice(agen(), 88))) # Michael S. Branicky, Apr 07 2024

Formula

a(n) <= A371809(n).

A371809 Number of 666 substrings contained in the decimal expansion of the n-th apocalyptic number, where overlapping substrings are counted as distinct.

Original entry on oeis.org

1, 1, 1, 4, 3, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 2, 3
Offset: 1

Views

Author

Paolo Xausa, Apr 06 2024

Keywords

Comments

An apocalyptic number is a positive power of 2 containing 666 in its decimal expansion.
See A371807 for a variant counting only nonoverlapping substrings.

Examples

			a(8) = 2 because the 8th apocalyptic number (2^243) contains two (overlapping) 666 substrings in its decimal expansion:
                   ***
14134776518227074636666380005943348126619871175004951664972849610340958208.
                    ***
		

Crossrefs

Programs

  • Mathematica
    Select[StringCount[IntegerString[2^Range[1000]], "666", Overlaps->True], # > 0 &]
  • Python
    from itertools import islice
    def agen(): # generator of terms
        pow2 = 1
        while True:
            s = str(pow2)
            c = sum(1 for i in range(len(s)-2) if s[i:i+3] == "666")
            if c > 0: yield c
            pow2 <<= 1
    print(list(islice(agen(), 88))) # Michael S. Branicky, Apr 07 2024

Formula

a(n) >= A371807(n).

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

A328375 Numbers k such that the decimal expansion of 2^k contains the substring 777.

Original entry on oeis.org

24, 40, 75, 152, 166, 179, 181, 191, 194, 199, 214, 230, 235, 260, 282, 296, 304, 311, 317, 323, 326, 332, 342, 345, 363, 370, 374, 390, 417, 424, 426, 443, 455, 468, 471, 474, 475, 483, 489, 490, 505, 512, 523, 524, 536, 540, 559, 567, 581, 584, 585, 588, 593
Offset: 1

Views

Author

Eder Vanzei, Oct 14 2019

Keywords

Comments

The decimal expansion of 2^k ends in 7776 iff k == 40 (mod 500), so the sequence is infinite. - Jon E. Schoenfield, Oct 14 2019
Conjecture: if n > 30536, then a(n) = n + 3623. - Chai Wah Wu, Oct 26 2019

Examples

			16777216 = 2^24.
		

Crossrefs

Cf. A007356 (contains 666), A030000 (contains n).

Programs

  • Maple
    q:= n-> searchtext("777", cat(2^n))>0:
    select(q, [$1..600])[];  # Alois P. Heinz, Oct 26 2019
  • Mathematica
    aQ[n_] := SequenceCount[IntegerDigits[2^n], {7, 7, 7}] > 0; Select[Range[660], aQ] (* Amiram Eldar, Oct 26 2019 *)
  • Python
    A328375_list = [k for k in range(1000) if '777' in str(2**k)] # Chai Wah Wu, Oct 26 2019

A371838 Decimal expansion of 666^666, the Legion's number of the first kind.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Apr 08 2024

Keywords

Comments

This number has 1881 digits and contains two nonoverlapping 666 substrings.

Examples

			2715417592887128558260874551700217860278385210650169871782230046965783675...
		

Crossrefs

Programs

  • Mathematica
    IntegerDigits[666^666][[;;100]]
  • PARI
    digits(666^666) \\ Michel Marcus, Apr 08 2024
  • Python
    afull = list(map(int, str(666**666))) # Michael S. Branicky, Apr 08 2024
    
Showing 1-7 of 7 results.