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.

User: Eder Vanzei

Eder Vanzei's wiki page.

Eder Vanzei has authored 23 sequences. Here are the ten most recent ones:

A355458 Numbers k that set a new record m where m is the largest left-truncatable prime up to the final k (stop on reaching the final k).

Original entry on oeis.org

1, 7, 111, 3367, 7787, 8517, 9071, 54079, 54451, 138657, 262157, 759461, 857817, 4662317, 21754021, 25400729, 41171387, 50304331, 368119693, 799245603, 938577991
Offset: 1

Author

Eder Vanzei, Jul 02 2022

Keywords

Comments

If instead of comparing the values of m, we compare the number of digits concatenated to k, then there are only 3 known terms: 1, 7 and 50304331 with 19, 23 and 24 digits respectively.

Examples

			a(1) = 1 because 1 sets a record m = 89726156799336363541 and 89726156799336363541, 9726156799336363541, 726156799336363541, 26156799336363541, 6156799336363541, 156799336363541, 56799336363541, 6799336363541, 799336363541, 99336363541, 9336363541, 336363541, 36363541, 6363541, 363541, 63541, 3541, 541, 41 are all primes (the truncation stops when the final k is reached).
a(2) = 7 because for k = 2..6 no m exceeds 89726156799336363541, but for k = 7, m = 357686312646216567629137.
		

Crossrefs

Cf. A024785.

Programs

  • Python
    from sympy import isprime
    def findNewCandidates(candidates):
      newCandidates = []
      for candidate in candidates:
        for k in range(1,10):
          p = int(str(k) + str(candidate))
          if (isprime(p)):
            newCandidates.append(p)
      return newCandidates
    record = 0
    for k in range(1, 10**6):
      if (k % 2 == 0 or k % 5 == 0):
        continue
      toCheck = [k]
      while len(toCheck) > 0:
        lastToCheck = toCheck
        toCheck = findNewCandidates(toCheck)
      result = lastToCheck[-1]
      if (result > record):
        record = result
        print(str(k))

Extensions

a(15)-a(18) from Michael S. Branicky, Jul 02 2022
a(19)-a(21) from Michael S. Branicky, Jul 04 2022

A351653 a(n) is the concatenation of the length of each run of digits in the decimal representation of n.

Original entry on oeis.org

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

Author

Eder Vanzei, Feb 16 2022

Keywords

Examples

			a(100) = 12, because the 1st run (1) has length 1 and the 2nd run (00) has length 2.
a(13211) = 1112, because the 1st run (1) has length 1, the 2nd run (3) has length 1, the 3rd run (2) has length 1 and the 4th run (11) has length 2.
		

Crossrefs

Cf. A001462, A318921, A318927 (binary version).

Programs

  • Mathematica
    a[n_] := FromDigits[IntegerDigits[Length /@ Split[IntegerDigits[n]]] // Flatten]; Array[a, 100, 0] (* Amiram Eldar, Feb 16 2022 *)
  • PARI
    a(n) = {my(result = "", count = 0, dig = digits(n), last = dig[1]); for(i = 1, length(dig), current = dig[i]; if (current == last, count++, result = concat(result, Str(count)); count = 1); last = current); result = concat(result, Str(count)); return(eval(result))};
    
  • PARI
    apply( {A351653(n,d=digits(n+!n))=d=concat([0,[k|k<-[1..#n=d[^1]-d[^-1]], n[k]], #d]); fromdigits(d[^1]-d[^-1])}, [0..77]) \\ M. F. Hasler, Aug 21 2025
    
  • Python
    from itertools import groupby
    def A351653(n): return int(''.join(str(len(list(g))) for k, g in groupby(str(n)))) # Chai Wah Wu, Mar 11 2022

A346674 Nonnegative numbers k such that MD5(k interpreted as a string) contains only decimal digits.

Original entry on oeis.org

1518375, 6637317, 16781059, 20274157, 20680348, 22080638, 24026537, 25394302, 26059015, 28926467, 40459791, 42057668, 42390227, 42943634, 43983547, 47788382, 49974597, 51201829, 59344568, 63236613, 63341298, 70557689, 74946923, 76642382, 77213479, 77641296
Offset: 1

Author

Eder Vanzei, Jul 28 2021

Keywords

Comments

See A234849 for more information about MD5.
This sequence is probably infinite, because MD5 returns a fixed-length output, but we don't know if outputs containing only decimal digits appear infinitely many times. Even if this is the case, it would not be enough, as we would not know if this holds when we consider the input as a number (interpreted as a string).

Examples

			a(1) = 1518375, because 1518375 is the smallest k >= 0 such that MD5(k) contains only decimal digits: MD5("1518375") = "93240121540327474319550261818423".
		

Crossrefs

Cf. A234849.

Programs

  • Mathematica
    Monitor[Do[If[!StringContainsQ[Hash[ToString@k,"MD5","HexString"],Alphabet[]],Print@k],{k,10^9}],k] (* Giorgos Kalogeropoulos, Jul 28 2021 *)
  • Python
    from hashlib import md5
    i=0
    while True:
        m = md5()
        m.update(str(i).encode('utf-8'))
        result = m.hexdigest()
        if result.isdecimal():
            print(i)
        i+=1

A337844 a(1) = 1; a(n) = a(n-1) concatenated with the smallest number k>0 such that tau(a(n)) > tau(a(n-1)).

Original entry on oeis.org

1, 11, 111, 1112, 11124, 1112410, 111241020, 11124102080, 11124102080130, 11124102080130102, 11124102080130102180, 11124102080130102180480, 11124102080130102180480160, 11124102080130102180480160116
Offset: 1

Author

Eder Vanzei, Sep 25 2020

Keywords

Comments

This sequence is infinite because k can be of the form m*10^n for some m and n > 0.

Examples

			a(4) = 1112, because a(3) = 111 and tau(111) = 4, so a(n) must be equal to 111//k ("//" denotes concatenation) and tau(a(4)) > 4, therefore the smallest k that satisfies this condition is 2.
		

Crossrefs

Cf. A000005.

Programs

  • Mathematica
    f[1] = {1, 1}; f[n_] := f[n] = Module[{k = 1, t = f[n - 1][[1]], d = IntegerDigits[f[n - 1][[2]]]}, While[(t1 = DivisorSigma[0, (n1 = FromDigits @ Join[d, IntegerDigits[k]])]) <= t, k++]; {t1, n1}]; a[n_] := f[n][[2]]; Array[a, 14] (* Amiram Eldar, Sep 26 2020 *)
  • PARI
    a(n) = if(n == 1, l = m = vector(100); return(l[1] = 1), for(k = 1,oo, j = eval(concat(Str(l[n-1]),k)); if((m[n] = numdiv(j)) > m[n-1], return(l[n] = j))))
    for(k=1,10,print1(a(k),", "));

Formula

a(1) = 1; a(n) = a(n-1) concatenated with the smallest number k>0, such that A000005(a(n)) > A000005(a(n-1)).

A334620 a(n) is the smallest multiple of n formed by the concatenation 1,2,3,...,k for some k.

Original entry on oeis.org

1, 12, 12, 12, 12345, 12, 1234567891011, 123456, 12345678, 12345678910, 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106, 12
Offset: 1

Author

Eder Vanzei, Sep 09 2020

Keywords

Examples

			a(3) = 12, because 12 is the smallest multiple of 3 that appears in A007908.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local x,i;
    x:= 0;
    for i from 1 do
      x:= x*10^(1+ilog10(i))+i;
      if x mod n = 0 then return x fi
    od
    end proc:
    map(f, [$1..20]); # Robert Israel, Oct 25 2020
  • Mathematica
    smn[n_]:=Module[{k=1,c=1},While[!Divisible[c,n],k++;c= c*10^IntegerLength[ k]+ k];c]; Array[ smn,20] (* Harvey P. Dale, Apr 04 2022 *)
  • PARI
    a(n) = j="";for(k=1, oo, j=eval(concat(Str(j), k)); if(j%n==0, return(j)))

Formula

a(n) is the smallest multiple of n appearing in A007908.

A336401 a(n) = a(n-1) concatenated with the smallest number k, such that a(n) is divisible by lcm(1..n).

Original entry on oeis.org

1, 10, 102, 1020, 10200, 102000, 102000360, 1020003600, 10200036001680, 102000360016800, 10200036001680035280, 102000360016800352800, 102000360016800352800332640, 1020003600168003528003326400
Offset: 1

Author

Eder Vanzei, Jul 20 2020

Keywords

Crossrefs

Programs

  • PARI
    a(n)={if(n==1,return(1));for(n1=0,oo,k=eval(concat(Str(a(n-1)),n1));n2=0;for(n3=1,n,if(k%n3==0,n2+=1;if(n2==n,return(k)))))};

A336399 a(1) = 1, a(n) is the smallest number such that the concatenation a(1)a(2)...a(n) is divisible by lcm(1..n).

Original entry on oeis.org

1, 0, 2, 0, 0, 0, 360, 0, 1680, 0, 35280, 0, 332640, 0, 0, 0, 8648640, 0, 306306000, 0, 0, 0, 232792560, 0, 0, 0, 26771144400, 0, 481880599200, 0, 41923612130400, 0, 0, 0, 0, 0, 5487335009956800, 0, 0, 0, 245774847024907200, 0, 8105227020364874400, 0, 0, 0, 452140231622516236800, 0, 3984485791173424336800, 0
Offset: 1

Author

Eder Vanzei, Jul 20 2020

Keywords

Examples

			a(7) = 360 as the smallest positive integer k such that the concatenation a(1)a(2)..a(6)k is divisible by lcm(1..7) = 420. - _David A. Corneth_, Jul 21 2020
		

Crossrefs

Cf. A336401 (corresponding numbers), A003418 (LCM's).

Programs

  • Maple
    N:= 1: R:= 1: C:= 1:
    for n from 2 to 60 do
      N:= ilcm(N,n);
      for d from 1 do
        x:= -C*10^d mod N;
        if x = 0 then lx:= 1 else lx:= 1+ilog10(x) fi;
        if lx = d then
           R:= R,x;
           C:= C*10^d+x;
           break
        elif lx < d then
           k:= ceil((10^(d-1)-x)/N);
           x:= x + k*N;
           if x < 10^d then
             R:= R,x;
             C:= C*10^d+x;
             break
        fi fi
    od; od:
    R; # Robert Israel, Sep 16 2020
  • PARI
    a(n) = {if(n==1,return(1));for(n1 = 0, oo, ; k[n]=eval(concat(Str(k[n-1]), n1)); n2=0; for(n3 = 1, n, if(k[n] % n3 == 0, n2+=1; if(n2==n, return(k[n])))))};
    k = vector(10000);print1(k[1]=1,", ");for(j=1, 20, print1(a(j+1) - a(j)*10^(length(Str(a(j+1))) - length(Str(a(j)))), ", "))
    
  • PARI
    \\ See Corneth link. David A. Corneth, Jul 21 2020

Extensions

a(27)-a(50) from David A. Corneth, Jul 20 2020

A333368 Primes of the form k*m^(k*m) - 1 with m > 1.

Original entry on oeis.org

3, 31, 191, 5119, 131071, 524287, 3758096383, 4353564671, 1356446145697, 1618481116086271, 2058911320946489, 1046695266054721074427023041, 847823165504324070285888664019, 5359447279004780799548150067050349330431, 2817103802133904744169307240538184064530443801964688726052818649087
Offset: 1

Author

Eder Vanzei, Mar 17 2020

Keywords

Examples

			31 appears in this sequence because 31=2*2^(2*2)-1 and 31 is prime.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(k, n=2, v=List([]), x=4, y); while(xJinyuan Wang, Mar 18 2020

Extensions

Corrected by Michel Marcus and Jinyuan Wang, Mar 17 2020

A333770 Smallest palindromic number >= 3^n.

Original entry on oeis.org

1, 3, 9, 33, 88, 252, 737, 2222, 6666, 19691, 59095, 177771, 532235, 1594951, 4783874, 14355341, 43055034, 129141921, 387424783, 1162332611, 3486886843, 10460406401, 31381118313, 94143234149, 282429924282, 847288882748
Offset: 0

Author

Eder Vanzei, Apr 04 2020

Keywords

Examples

			a(10) = 59095, because 3^10 = 59049 and 59095 is the smallest palindromic number >= 59049.
		

Crossrefs

Programs

  • Maple
    digrev:= proc(n) local L,i;
      L:= convert(n,base,10);
      add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) local d,x,y,t;
      d:= ilog10(n)+1;
      if d::even then
        x:= floor(n/10^(d/2));
        t:= x*10^(d/2)+digrev(x);
        if t >= n then return t fi;
        (x+1)*10^(d/2)+digrev(x+1);
      else
        x:= floor(n/10^((d-1)/2));
        t:= x*10^((d-1)/2)+digrev(floor(x/10));
        if t >= n then return t fi;
        y:= x mod 10;
        if y < 9 then return t + 10^((d-1)/2) fi;
        x:= x+1;
        x*10^((d-1)/2)+digrev(floor(x/10));
      fi
    end proc:
    seq(f(3^i),i=0..30); # Robert Israel, May 04 2020
  • PARI
    a(n) = for(k=3^n, oo, if(Vecrev(v=digits(k))==v, return(k)));

Formula

a(n) = A262038(A000244(n)). - Michel Marcus, May 04 2020

A333578 Numbers k such that a division occurs in A330139(k).

Original entry on oeis.org

5, 12, 21, 172, 15277, 703981, 2060911, 6663113
Offset: 1

Author

Eder Vanzei, Mar 27 2020

Keywords

Comments

Is this sequence infinite?

Examples

			5 is in this sequence because a division occurs in A330139(5).
		

Crossrefs

Cf. A330139.

Programs

  • Mathematica
    seq = {}; n1 = n2 = 1; Do[n3 = n1 + n2; If[Divisible[n3, n], n3/=n; AppendTo[seq, n]]; n1 = n2; n2 = n3, {n, 3, 2*10^4}]; seq (* Amiram Eldar, Mar 28 2020 *)
  • PARI
    lista(nn) = {my(x = 1, y = 1, z); for (n=3, nn, z = x + y; if ((z % n) == 0, z = z/n; print1(n, ", ")); x = y; y = z;);} \\ Michel Marcus, Mar 27 2020