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

A257668 Primes containing a digit 7.

Original entry on oeis.org

7, 17, 37, 47, 67, 71, 73, 79, 97, 107, 127, 137, 157, 167, 173, 179, 197, 227, 257, 271, 277, 307, 317, 337, 347, 367, 373, 379, 397, 457, 467, 479, 487, 547, 557, 571, 577, 587, 607, 617, 647, 673, 677, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761
Offset: 1

Views

Author

Vincenzo Librandi, May 03 2015

Keywords

Comments

Primes in A062675.
Subsequence of primes of A011537. - Michel Marcus, May 03 2015

Examples

			For n = 2, a(2) = 17 is the second prime containing a digit of 7.
		

Crossrefs

Cf. similar sequences listed in A257667.
Cf. A011537, A062675, A166579 (subsequence).

Programs

  • Magma
    [p: p in PrimesUpTo(800) | 7 in Intseq(p)];
    
  • Mathematica
    Select[Prime[Range[150]], ! StringFreeQ[ToString[#], "7"] &]
  • PARI
    lista(nn) = forprime(p=2, nn, if(vecsearch(vecsort(digits(p)), 7), print1(p, ", "))); \\ Altug Alkan, Apr 21 2016; corrected by Michel Marcus, Oct 30 2023
  • Sage
    [p for p in primes(800) if 7 in p.digits(base=10)] # Bruno Berselli, May 03 2015
    

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Nov 01 2022

A243529 Prime numbers containing the string 12.

Original entry on oeis.org

127, 1123, 1129, 1201, 1213, 1217, 1223, 1229, 1231, 1237, 1249, 1259, 1277, 1279, 1283, 1289, 1291, 1297, 2129, 3121, 4127, 4129, 6121, 7121, 7127, 7129, 8123, 9127, 11213, 11239, 11243, 11251, 11257, 11261, 11273, 11279, 11287
Offset: 1

Views

Author

Vincenzo Librandi, Jun 06 2014

Keywords

Comments

Subsequence of A208272. [Bruno Berselli, May 06 2015]

Crossrefs

Cf. similar sequences listed in A257667.

Programs

  • Mathematica
    Select[Prime[Range[2000]], ! StringFreeQ[ToString[#], "12" ] &]
  • PARI
    contains(n,k)=my(N=digits(n),K=digits(k)); for(i=0,#N-#K, for(j=1,#K,if(N[i+j]!=K[j],next(2))); return(1)); 0
    is(n)=isprime(n) && contains(n,12) \\ Charles R Greathouse IV, Jun 20 2014

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Jun 20 2014

A284290 Primes containing a digit 4.

Original entry on oeis.org

41, 43, 47, 149, 241, 347, 349, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 541, 547, 641, 643, 647, 743, 941, 947, 1049, 1249, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489
Offset: 1

Views

Author

Jaroslav Krizek, Mar 24 2017

Keywords

Comments

Subsequence of A011534 and A062669.

Crossrefs

Cf. Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), A284292 (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 4 in Intseq(p)]
  • Mathematica
    Select[Range[1500], PrimeQ[#] && MemberQ[IntegerDigits[#], 4] &] (* Amiram Eldar, Nov 09 2019 *)

A284291 Primes containing a digit 6.

Original entry on oeis.org

61, 67, 163, 167, 263, 269, 367, 461, 463, 467, 563, 569, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 761, 769, 863, 967, 1061, 1063, 1069, 1163, 1361, 1367, 1567, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663
Offset: 1

Views

Author

Jaroslav Krizek, Mar 24 2017

Keywords

Comments

Subsequence of A011536 and A062673.

Crossrefs

Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), A284292 (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 6 in Intseq(p)];
  • Mathematica
    Select[Range[2000], PrimeQ[#] && MemberQ[IntegerDigits[#], 6] &] (* Amiram Eldar, Nov 09 2019 *)

A284292 Primes containing a digit 8.

Original entry on oeis.org

83, 89, 181, 281, 283, 383, 389, 487, 587, 683, 787, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 983, 1087, 1181, 1187, 1283, 1289, 1381, 1481, 1483, 1487, 1489, 1583, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867
Offset: 1

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Comments

Subsequence of A011538 and A062677.
Differs from A062677 which contains also the composites 6889 = 83^2, 7387 = 83*89, 23489=83*283, 25187=89*283, 31789 = 83*383 etc. - R. J. Mathar, Mar 27 2017

Crossrefs

Cf. Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), this sequence (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 8 in Intseq(p)];
    
  • Maple
    isA284292 := proc(n)
        if isprime(n) then
            convert(convert(n,base,10),set) ;
            if 8 in % then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    for n from 1 to 2000 do
        if isA284292(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Mar 27 2017
  • Mathematica
    Select[Prime@ Range@ 500, MemberQ[ IntegerDigits@ #, 8] &] (* Giovanni Resta, Mar 25 2017 *)
  • Python
    from sympy import primerange
    print([n for n in primerange(2, 2000) if '8' in str(n)]) # Indranil Ghosh, Mar 25 2017
Showing 1-5 of 5 results.