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

A174926 Smallest prime which has a decimal representation which shows n^2 embedded in otherwise only decimal square digits 0, 1, 4 and 9.

Original entry on oeis.org

101, 11, 41, 19, 1601, 251, 1361, 149, 641, 811, 1009, 12101, 14401, 1699, 11969, 2251, 12569, 1289, 13241, 1361, 4001, 4441, 48409, 10529, 15761, 62501, 946769, 4729, 7841, 8419, 9001, 9619, 102409, 10891, 115601, 12251, 129641, 11369, 14449
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 02 2010

Keywords

Comments

There are four decimal square digits: 0 = 0^2 = 0, 1 = 1^2, 4 = 2^2, 9 = 3^2.
It is conjectured that sequence is infinite.
Some primes of the form n^2//1 = 10 * n^2 + 1 are in this sequence: for n = 1, 2, 5, ...
Note this curiosity of a double appearance of 1361 as 1//6^2//1 = p(6^2) = 1361 = p(19^2) = 1//19^2 or of 13691 = prime(1618) = 37^2//1 > 11369 = prime(1373) = 1//37^2 = p(37^2), 38th term of sequence

Examples

			Let // denote concatenation of digits. Then:
101 = prime(26) = 1//0^2//1.
11 = prime(5) = 1^2//1.
41 = prime(13) = 2^2//1.
19 = prime(8) = 1//3^2.
1601 = prime(252) = 4^2//0//1.
251 = prime(54) = 5^2//1.
1361 = prime(218) = 1//6^2//1.
149 = prime(35) = 1//7^2.
641 = prime(116) = 8^2//1.
811 = prime(141) = 9^2//1.
1009 = prime(169) = 10^2//9.
12101 = prime(1448) = 11^2//0//1.
		

Crossrefs

A197816 Smallest composite number m such that m and the greatest prime divisor of m begin with n.

Original entry on oeis.org

102, 203, 36, 410, 50, 603, 70, 801, 970, 1010, 110, 1270, 130, 1490, 1510, 1630, 170, 1810, 190, 20030, 2110, 2230, 230, 2410, 2510, 2630, 2710, 2810, 290, 3070, 310, 32030, 3310, 3470, 3530, 3670, 370, 3830, 3970, 4010, 410, 4210, 430, 4430, 4570, 4610, 470
Offset: 1

Views

Author

Michel Lagneau, Oct 18 2011

Keywords

Comments

A majority of numbers are divisible by 10.
The case m prime gives A062584 (First occurrence of n in the decimal representation of primes).

Examples

			a(6) = 603 = 3^2*67 => 603 and 67 start with 6.
		

Crossrefs

Programs

  • Maple
    with(numtheory): for n from 1 to 47 do: l1:=length(n):i:=0:for m from 2 to 100000 while(i=0) do: x:=factorset(m):k:=nops(x):y:=x[k]: l2:=length(m):x1:=floor(m/(10^(l2-l1))): l3:=length(y):x2:=floor(y/(10^(l3-l1))):if x1=n and x2=n and l2>=l1 and l3 >=l1 and type(m,prime)=false then i:=1: printf(`%d, `,m):else fi :od:od:
    # Alternative:
    f:= proc(n) local d,k,p;
      for d from 1 do
        for k from 10^d*n to 10^d*(n+1)-1 do
           if not isprime(k) then
             p:= max(numtheory:-factorset(k));
             if p >= n and floor(p/10^(length(p)-length(n))) = n then return k fi
           fi od od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jun 04 2018

Formula

a(n) = 10*A018800(n) for n >= 9. - Robert Israel, Jun 04 2018

A377483 Smallest index k such that prime(k) in base-2 contains n in base-2 as a contiguous substring.

Original entry on oeis.org

1, 1, 2, 7, 3, 6, 4, 7, 8, 13, 5, 24, 6, 10, 11, 19, 7, 12, 8, 13, 14, 24, 9, 25, 24, 16, 17, 30, 10, 18, 11, 32, 19, 33, 20, 21, 12, 63, 22, 38, 13, 68, 14, 24, 29, 70, 15, 25, 30, 26, 27, 47, 16, 29, 48, 30, 50, 51, 17, 53, 18, 54, 31, 55, 32, 77, 19, 33, 34, 60, 20, 79
Offset: 1

Views

Author

Charles Marsden, Oct 29 2024

Keywords

Comments

The intersections between this sequence and similar sequences in base-B occur at values of n that are the sequence of prime numbers, and values of a(n) that are the sequence of positive integers.

Examples

			For n=1 -> 1 in base-2. The first prime containing 1 in its base-2 form is prime(1)=2 -> 10. Therefore, a(1)=1.
For n=3 -> 11 in base-2. The first prime containing 11 in its base-2 form is prime(2)=3 -> 11. Therefore, a(3)=2.
For n=5 -> 101 in base-2. The first prime containing 101 in its base-2 form is prime(3)=5 -> 101. Therefore, a(5)=3.
		

Crossrefs

Programs

  • Mathematica
    s={}; Do[k=0;Until[SequenceCount[IntegerDigits[Prime[k],2],IntegerDigits[n,2]]>0,k++]; AppendTo[s,k],{n,72}];s (* James C. McMahon, Nov 20 2024 *)
  • PARI
    a(n) = { my (w = 2^#binary(n), k = 0, r); forprime (p = 2, oo, k++; r = p; while (r >= n, if (r % w == n, return (k), r \= 2;););); } \\ Rémy Sigrist, Nov 20 2024
  • Python
    # See links.
    
  • Python
    from sympy import nextprime, primepi
    def A377483(n):
        p, k, a = nextprime(n-1), primepi(n-1)+1, bin(n)[2:]
        while True:
            if a in bin(p)[2:]:
                return k
            p = nextprime(p)
            k += 1 # Chai Wah Wu, Nov 20 2024
    

A381606 a(n) is the smallest prime number greater than n that contains n as a substring of its digits.

Original entry on oeis.org

101, 11, 23, 13, 41, 53, 61, 17, 83, 19, 101, 113, 127, 113, 149, 151, 163, 173, 181, 191, 1201, 211, 223, 223, 241, 251, 263, 127, 281, 229, 307, 131, 1321, 233, 347, 353, 367, 137, 383, 139, 401, 241, 421, 431, 443, 457, 461, 347, 487, 149, 503, 151, 521, 353, 541
Offset: 0

Views

Author

Joost de Winter, Mar 01 2025

Keywords

Examples

			The first prime number greater than 0 that contains "0" is 101, so a(0) = 101.
The first prime number greater than 1 that contains "1" is 11, so a(1) = 11.
The first prime number greater than 2 that contains "2" is 23, so a(2) = 23.
		

Crossrefs

Programs

  • MATLAB
    \\ See De Winter link
    
  • Maple
    f:= proc(n) local m,d,d1,x,y,L;
      m:= length(n);
      for d from 1 do
        L:= sort([seq(10^d * n + x, x = 1 .. 10^d-1, 2),
                 seq(n+10^m*x, x=10^(d-1) .. 10^d-1),
                 seq(seq(seq(10^d1*n + x + 10^(m+d1)*y, x=1 .. 10^d1-1,2),y=10^(d-d1-1) .. 10^(d-d1)-1),d1=1..d-1)]);
        for x in L do if isprime(x) then return x fi od
      od
    end proc:
    f(0):= 101:
    map(f, [$0..100]); # Robert Israel, Mar 02 2025
  • Mathematica
    a[n_] := Module[{p = NextPrime[n + 1], s = ToString[n]}, While[! StringContainsQ[ToString[p], s], p = NextPrime[p]]; p]; Array[a, 100, 0] (* Amiram Eldar, Mar 03 2025 *)
  • PARI
    a(n) = my(p=nextprime(n+1), s=Str(n)); while (#strsplit(Str(p), s) < 2, p = nextprime(p+1)); p; \\ Michel Marcus, Mar 01 2025
    
  • PARI
    \\ See Corneth link

Formula

a(n) > 2n. For large enough n, a(n) < n^5 by the strongest known version of Linnik's theorem. - Charles R Greathouse IV, Mar 01 2025

A065144 Smallest prime containing the n-th square in decimal notation.

Original entry on oeis.org

11, 41, 19, 163, 251, 367, 149, 641, 181, 1009, 1213, 1447, 1693, 11969, 2251, 12569, 1289, 13241, 1361, 4001, 2441, 14843, 3529, 15761, 6257, 6761, 2729, 7841, 6841, 9001, 6961, 10243, 10891, 115601, 12251, 12967, 11369, 14447, 15217, 16001
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 17 2001

Keywords

Comments

Essentially the same as A029948. [From R. J. Mathar, Oct 02 2008]

Crossrefs

A089754 Smallest prime ending (least significant side) in n if possible else beginning in n.

Original entry on oeis.org

11, 2, 3, 41, 5, 61, 7, 83, 19, 101, 11, 127, 13, 149, 151, 163, 17, 181, 19, 2003, 421, 223, 23, 241, 251, 263, 127, 281, 29, 307, 31, 3203, 233, 347, 353, 367, 37, 383, 139, 401, 41, 421, 43, 443, 457, 461, 47, 487, 149, 503, 151, 521, 53, 541, 557, 563, 157, 587, 59, 601, 61, 6203, 163
Offset: 1

Views

Author

Amarnath Murthy, Nov 22 2003

Keywords

Crossrefs

Programs

  • Maple
    read("transforms)"):
    nleadzero := proc(n,dgs)
        local ndgs ;
        if n = 0 then
            ndgs := 0 ;
        else
            ndgs := ilog10(n)+1 ;
        end if;
        [op(convert(n,base,10)),seq(0,i=1..dgs-ndgs)]
    end proc:
    digcatL2 := proc(L1,L2)
        digcatL([op(L1),op(L2)]) ;
    end proc:
    A089754 := proc(n)
        local prep,a,dgs ;
        if isprime(n) then
            n;
        elif modp(n,2) = 0 or modp(n,5) = 0 then
            ndgs := convert(n,base,10) ;
            for dgs from 1 do
                for prep from 0 to 10^dgs-1 do
                    a := digcatL2(ListTools[Reverse](ndgs),ListTools[Reverse](nleadzero(prep,dgs))) ;
                    if isprime(a) then
                        return a;
                    end if;
                end do:
            end do:
        else
            for prep from 1 do
                a := digcat2(prep,n) ;
                if isprime(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc: # R. J. Mathar, Sep 18 2015

Extensions

Corrected by R. J. Mathar, Sep 18 2015

A103611 Smallest prime p with at least two non-overlapping occurrences of n in decimal representation of p.

Original entry on oeis.org

11, 223, 233, 443, 557, 661, 277, 881, 199, 10103, 11113, 112121, 13313, 14143, 115151, 116167, 11717, 18181, 19219, 20201, 21121, 22229, 12323, 24247, 25253, 26261, 22727, 28283, 29129, 30307, 23131, 32321, 23333, 134341, 35353, 136361
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 24 2005

Keywords

Comments

A062584(n) <= a(n).

Programs

  • Mathematica
    With[{prs=Prime[Range[15000]]},Table[SelectFirst[prs, SequenceCount[ IntegerDigits[ #], IntegerDigits[n]]>1&],{n,40}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 30 2016 *)

A178546 Emirps in which n first occurs as a substring.

Original entry on oeis.org

107, 13, 1021, 13, 149, 157, 167, 17, 389, 79, 107, 113, 1201, 13, 149, 157, 167, 17, 1181, 199, 1201, 1021, 1223, 1223, 1249, 1259, 12269, 1279, 1283, 1229, 1301, 31, 1321, 337, 347, 359, 3613, 37, 389, 739, 1409, 941, 1429, 743, 11447, 1453, 3463, 347, 1487, 149, 7507
Offset: 0

Views

Author

Lekraj Beedassy, May 29 2010

Keywords

Crossrefs

Programs

  • Mathematica
    emrpQ[n_]:=Module[{idn=IntegerDigits[n],ridn},ridn=Reverse[idn]; idn!=ridn && PrimeQ[ FromDigits[ ridn]]]; nss[n_]:= Module[{idn=IntegerDigits[n]}, Select[e,MemberQ[Partition[ IntegerDigits[#],Length[idn],1],idn]&,1]]; With[{e=Select[Prime[Range[50000]],emrpQ]},Flatten[ Join[{107}, Table[ nss[i], {i,50}]]]] (* Harvey P. Dale, Oct 08 2012 *)

Extensions

Corrected and extended by Harvey P. Dale, Oct 08 2012

A246398 Smallest number of digits that have to be inserted into or prepended to decimal representation of n, to get a prime.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Nov 13 2014

Keywords

Comments

a(n) = 0 iff n is a prime number, a(A000040(n)) = 0;
a(n) = A055642(A062584(n)) - A055642(n).

Crossrefs

Programs

  • Haskell
    a246398 n = a246398_list !! n
    a246398_list = f 0 $ map show a000040_list where
       f x pss = (length ps - length xs) :
                 f (x + 1) (dropWhile (== xs) pss)
         where ps = head [qs | qs <- pss, isin xs qs]; xs = show x
       isin [] _  = True
       isin _  [] = False
       isin (u:us) vs = not (null ws) && isin us ws
                        where ws = dropWhile (/= u) vs

A263450 Smallest integer k>0 such that there is at least one zero in the decimal representation of prime(n)^k.

Original entry on oeis.org

10, 10, 8, 4, 5, 6, 7, 4, 6, 4, 6, 3, 5, 3, 2, 2, 3, 5, 3, 2, 3, 3, 5, 3, 2, 1, 1, 1, 1, 4, 3, 3, 6, 4, 2, 2, 4, 3, 5, 4, 2, 4, 4, 3, 2, 2, 5, 3, 3, 3, 6, 4, 2, 2, 2, 4, 3, 3, 5, 3, 2, 4, 1, 3, 3, 2, 2, 6, 2, 2, 2, 4, 3, 5, 4, 6, 4, 2, 1, 1, 3, 4, 3, 5, 3, 3, 2, 2, 5
Offset: 1

Views

Author

Zak Seidov, Oct 18 2015

Keywords

Comments

Conjecture: there are an infinite number of ones in the sequence.
Corresponding values of prime(n)^k: 1024, 59049, 390625, 2401, 161051, 4826809, 410338673, 130321 (not yet in OEIS).
From Robert Israel, Oct 19 2015: (Start)
By Dirichlet's theorem there are infinitely many n for which prime(n) == 1 (mod 100), and these all have a(n) = 1.
All a(n) <= 20, since every x coprime to 10 has x^20 == 1 (mod 100). (End)

Crossrefs

Programs

  • Maple
    f:= proc(m) local k;
    for k from 1 do
         if has(convert(m^k,base,10),0) then return k fi
       od
    end proc:
    seq(f(ithprime(i)), i=1..1000); # Robert Israel, Oct 19 2015
  • Mathematica
    Reap[Do[p=Prime[n];k=1;While[Min[IntegerDigits[p^k]]>0,k++];Sow[k],{n,1,200}]][[2,1]]
  • PARI
    a(n) = {p = prime(n); k = 1; while (vecmin(digits(p^k)), k++); k;} \\ Michel Marcus, Oct 21 2015

Formula

a(n) = A071531(prime(n)). - Michel Marcus, Oct 21 2015
Previous Showing 11-20 of 23 results. Next