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

A383322 Lexicographically earliest sequence of distinct terms such that replacing each term k with k! does not change the succession of digits.

Original entry on oeis.org

1, 2, 198, 15, 5, 24, 3, 0, 56, 4, 800, 260, 18, 181, 7, 120, 43, 26, 25, 78, 46, 6, 11, 45, 67, 2580, 8, 37, 34, 49, 61, 66, 465, 63, 9, 28, 62, 93, 960, 65, 410, 626, 13, 82, 98, 59, 32, 659, 453, 242, 255, 580, 939, 42, 70, 44, 932, 22, 55, 38, 389, 50
Offset: 1

Views

Author

Dominic McCarty, Apr 23 2025

Keywords

Comments

Similarly to A302656, this sequence contains very large jumps. For example, a(131) = 4*10^47, a(702) = 496*10^199, a(2808) = 5712*10^643, etc.

Examples

			Let b(n) = a(n)!
(a(n)): 1, 2, 198, 15, 5, 24, 3, 0, 56, 4, 800, 260, 18, ...
(b(n)): 1, 2, 198155243056480026018[...] (350 digits omitted), ...
		

Crossrefs

Programs

  • Python
    from sympy import factorial
    from itertools import count
    a, sa, sb = [1, 2, 198], "12198", "12"+str(factorial(198))
    for _ in range(20):
        a.append(next(n for k in count(1) if not (n := int(sb[len(sa):len(sa)+k])) in a and (0 not in a or not (len(sb) > len(sa) + k and sb[len(sa) + k] == "0"))))
        sa += str(a[-1]); sb += str(factorial(a[-1]))
    print(a)

A229629 Numbers k such that k is in the middle of decimal expansion of k^k.

Original entry on oeis.org

1, 6, 888, 1808, 2138, 65246, 268105
Offset: 1

Views

Author

Farideh Firoozbakht, Oct 04 2013

Keywords

Comments

a(6) is greater than 50000.
a(8) > 600000. - Giovanni Resta, Oct 08 2013

Examples

			6 is in the sequence because 6^6 = 46656, which includes a 6 in the middle.
11 is not in the sequence, because even though the substring 11 appears twice in 11^11 = 285311670611, neither occurrence is precisely in the middle.
		

Crossrefs

Programs

  • Mathematica
    Do[a = IntegerDigits[n^n]; b = Length[a]; c = IntegerLength[n]; If[EvenQ[b - c] && FromDigits[Take[a, {(b - c)/2 + 1, (b + c)/2}]] == n, Print[n]], {n, 50000}]
  • PARI
    is(n)=my(d=digits(n),D=digits(n^n)); if((#d+#D)%2, return(0)); for(i=1,#d, if(d[i]!=D[#D/2-#d/2+i], return(0))); 1 \\ Charles R Greathouse IV, Jul 30 2016
    
  • Python
    from itertools import islice
    def A229629(): # generator of terms
        n = 1
        while True:
            s, sn = str(n**n), str(n)
            l, ln = len(s), len(sn)
            if (ln-l) % 2 == 0 and s[l//2-ln//2:l//2+(ln+1)//2] == sn: yield n
            n += 1
    A229629_list = list(islice(A229629(),5)) # Chai Wah Wu, Nov 21 2021

Extensions

a(6)-a(7) from Giovanni Resta, Oct 08 2013

A337904 Numbers k such that the decimal expansion of the k-th harmonic number starts with the digits of k, in the same order.

Original entry on oeis.org

1, 43, 714, 715, 9763, 122968, 122969, 1478366, 17239955, 196746419, 2209316467, 24499118645, 268950072605
Offset: 1

Views

Author

Metin Sariyar, Sep 29 2020

Keywords

Comments

The sequence also includes 196746419, 2209316467, 24499118645, 268950072605, 2928264676792, 31663398162514, 340383084842938, 3640820101879826. - Daniel Suteu, Oct 01 2020

Examples

			1/1 + 1/2 + 1/3 + ... + 1/1478366 = 14.78366... .
		

Crossrefs

Programs

  • Mathematica
    s=0;Do[s=s+(1/n);t=IntegerLength[n];m=IntegerLength[Floor[s]];k = Floor[s (10^(t-m))];If[k==n,Print[n]],{n,1,10^11}]
  • PARI
    lista(nn) = {my(s=0.); for (n=1, nn, s += 1./n; my(d = digits(floor(10^20*s))); if (fromdigits(vector(#Str(n), j, d[j])) == n, print1(n, ", ")););} \\ Michel Marcus, Sep 30 2020

Extensions

a(9) from Jinyuan Wang, Sep 30 2020
a(10)-a(12) from Chai Wah Wu, Oct 12 2020
a(13) from Chai Wah Wu, Oct 14 2020
Showing 1-3 of 3 results.