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

A155006 Primes p such that (p-2)*(p+2)-+2*p are primes.

Original entry on oeis.org

5, 7, 13, 23, 37, 43, 73, 167, 233, 263, 433, 557, 587, 593, 607, 727, 857, 1153, 1597, 1627, 1753, 2143, 2663, 2713, 3433, 3607, 3863, 3947, 4027, 4363, 4423, 4673, 5147, 5477, 5623, 5807, 5903, 6277, 7237, 7333, 7577, 8287, 8647, 8837, 8887, 9043, 10067
Offset: 1

Views

Author

Keywords

Comments

3*7-10=11, 3*7+10=31,...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-2)*(p+2)-2*p]&&PrimeQ[(p-2)*(p+2)+2*p],AppendTo[lst,p]],{n,7!}];lst
    Select[Prime[Range[1500]],AllTrue[(#-2)(#+2)+{2#,-2#},PrimeQ]&] (* Harvey P. Dale, Jan 01 2025 *)

A329760 Primes without {2, 7} as digits.

Original entry on oeis.org

3, 5, 11, 13, 19, 31, 41, 43, 53, 59, 61, 83, 89, 101, 103, 109, 113, 131, 139, 149, 151, 163, 181, 191, 193, 199, 311, 313, 331, 349, 353, 359, 383, 389, 401, 409, 419, 431, 433, 439, 443, 449, 461, 463, 491, 499, 503, 509, 541, 563, 569, 593, 599, 601, 613
Offset: 1

Views

Author

Alois P. Heinz, Nov 20 2019

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(700) | not 2 in Intseq(p) and not 7 in Intseq(p) ]; // Vincenzo Librandi, Jan 02 2020
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 2]==0 && DigitCount[#, 10, 7]==0 &] (* Vincenzo Librandi, Jan 02 2020 *)

Formula

{ A038604 } intersect { A038615 }.

A076805 Triskaidekaphobic or 13-free primes: primes that do not contain the number 13.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 127, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307
Offset: 1

Views

Author

Cino Hilliard, Nov 18 2002

Keywords

Examples

			The PARI program will mask out a sequence containing k or mask in a sequence containing k. The program is limited to primes < 400000000.
The PARI program will generate the following for input as shown: kprimes(2,100,7,0) = 2 3 5 11 13 19 23 29 31 41 43 53 59 61 83 89; kprimes(2,1000,13,1) = 13 113 131 137 139 313 613; kprimes(300000,4000000,314159,1) = 314159 3314159 5314159
		

Crossrefs

A generalization of the examples A038603, A038615 etc. for k = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 by Vasiliy Danilov.
Complement of A166573 with respect to A000040; cf. A011760

Programs

  • Haskell
    import Data.List (isInfixOf)
    a076805 n = a076805_list !! (n-1)
    a076805_list = filter (not . ("13" `isInfixOf`) . show) a000040_list
    -- Reinhard Zumkeller, Nov 09 2011
    
  • Mathematica
    Select[Prime[Range[90]],!MemberQ[Partition[IntegerDigits[#],2,1],{1,3}]&] (* Harvey P. Dale, Mar 25 2012 *)
    Select[Prime[Range[100]],SequenceCount[IntegerDigits[#],{1,3}]==0&] (* Harvey P. Dale, Aug 11 2023 *)
  • PARI
    /* k primes - kprimes.gp. Primes containing or not containing digit k=1,2,3...9,10,11... PARI does not have a good string manipulation capability. This program circumvents that by using the % modulo and floor operators. Also commented out is a log implementation which is slower than string apps. The program either masks out prime numbers k or masks them in.*/
    
  • PARI
    log10(z) = if(z>0,floor(log(z)/log(10))+1,1);\\integer function for log(z) base 10 + 1
    { kprimes(n1,n2,k,t) = \\n1,n2=range,k=mask,t=0 mask out t=1 mask in
    ct=0; pct=0; forprime(p=n1,n2,x=p; f=0;\\x=temp variable to diminish p
    ln = length(Str(p));\\get length of the prime p using strings
    lk = length(Str(k));\\get length of mask integer k using strings
    ln = log10(p);\\get length of the prime p using logs
    lk = log10(k);\\get length of mask integer k using strings
    r = 10^lk; \\set the remainder length = length of k
    for(j=1,ln-lk+1, \\permute through the digits
    d = x % r;\\get lk digits
    if(d==k,f=1; break);\\break for loop if match and set flag
    x = floor(x/10);\\diminish x for next test for k
    ); if(f==t,print1(p" "); ct+=1);\\if no k string of digits,print
    ); print(); print(ct); }
    
  • PARI
    hasNo13(n)=n=digits(n); for(i=2,#n, if(n[i]==3&&n[i-1]==1, return(0))); 1
    select(hasNo13, primes(10^4)) \\ Charles R Greathouse IV, Dec 02 2013
    
  • PARI
    is_A076805(n,t=13)=!until(t>n\=10,t==n%100&&return) \\ M. F. Hasler, Dec 02 2013

Formula

a(n) >> n^1.0044, where the exponent is log(r)/log(10) with r the larger root of x^2 - 10x + 1. [Charles R Greathouse IV, Nov 09 2011]
kfreep(n, k) = true if for primes p over the range n and integer k, p mod 10^(floor(log_10(k))+1) <> k for p = p/10 mod 10^(floor(log_10(k))+1) <> k over the range floor(log_10(k))+1. This is a mathematical definition of the recurrence. In practice it is convenient to use string operations. E.g., If Not Instr(Str(p), Str(k)) then true or k is not a substring of p so list p.

Extensions

Original PARI code restored by M. F. Hasler, Dec 02 2013

A155007 Primes p such that (p-3)*(p+3)-+3*p are primes.

Original entry on oeis.org

7, 17, 37, 113, 157, 227, 283, 293, 313, 347, 443, 587, 787, 883, 1063, 1097, 1237, 1303, 1327, 1427, 1567, 1723, 1933, 1973, 2087, 2347, 2467, 2687, 2777, 3457, 3593, 4447, 4703, 4793, 4967, 5737, 5827, 6317, 6607, 6793, 6857, 8297, 8563, 8803, 9433
Offset: 1

Views

Author

Keywords

Comments

4*10-3*7=19, 4*10+3*7=61, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-3)*(p+3)-3*p]&&PrimeQ[(p-3)*(p+3)+3*p],AppendTo[lst,p]],{n,7!}];lst

A254315 Number of distinct digits in the prime factorization of n (counting terms of the form p^1 as p).

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Jan 28 2015

Keywords

Comments

Write n as product of primes raised to powers; then a(n) is the total number of distinct digits in product representation (number of distinct digits in all the primes and number of distinct digits in all the exponents that are greater than 1).
a(n)<=10. The least n such that a(n)=10 is n = 41701690 = 2*5*47*83*1069.
Property: a(p) = A043537(p), for p prime.
From Michel Marcus, Feb 21 2015: (Start)
For p in A038604, a(p^2) = A043537(p) + 1.
For p in A038611, a(p^3) = A043537(p) + 1.
For p in A038612, a(p^4) = A043537(p) + 1.
For p in A038613, a(p^5) = A043537(p) + 1.
For p in A038614, a(p^6) = A043537(p) + 1.
For p in A038615, a(p^7) = A043537(p) + 1.
For p in A038616, a(p^8) = A043537(p) + 1.
For p in A038617, a(p^9) = A043537(p) + 1.
(End)

Examples

			a(36)=2 because 36 = 2^2 * 3^2 => 2 distinct digits.
a(414)=2 because 414 = 2 * 3^2 * 23 => 2 distinct digits.
		

Crossrefs

Programs

  • Maple
    with(ListTools):
    nn:=100:
      for n from 2 to nn do:
        n0:=length(n):lst:={}:x0:=ifactors(n):
        y:=Flatten(x0[2]):z:=convert(y,set):
        z1:=z minus {1}:nn0:=nops(z1):
         for k from 1 to nn0 do :
          t1:=convert(z1[k],base,10):z2:=convert(t1,set):
          lst:=lst union z2:
         od:
         nn1:=nops(lst):printf(`%d, `,nn1):
         od :
  • Mathematica
    f[n_] := Block[{pf = FactorInteger@ n, i}, Length@ DeleteDuplicates@ Flatten@ IntegerDigits@ Rest@ Flatten@ Reap@ Do[If[Last[pf[[i]]] == 1, Sow@ First@ pf[[i]], Sow@ FromDigits@ Flatten[IntegerDigits /@ pf[[i]]]], {i, Length@ pf}]]; Array[f,100] (* Michael De Vlieger, Jan 29 2015 *)
  • PARI
    print1(1,", ");for(k=2,100,s=[];F=factor(k);for(i=1,#F[,1],s=concat(s,digits(F[i,1]));if(F[i,2]>1,s=concat(s,digits(F[i,2]))));print1(#vecsort(s,,8),", ")) \\ Derek Orr, Jan 30 2015
    
  • Python
    from sympy import factorint
    def A254315(n):
        return len(set([x for l in [[d for d in str(p)]+[d for d in str(e) if d != '1'] for p,e in factorint(n).items()] for x in l]))
    # Chai Wah Wu, Feb 24 2015

A386358 Primes without {7, 9} as digits.

Original entry on oeis.org

2, 3, 5, 11, 13, 23, 31, 41, 43, 53, 61, 83, 101, 103, 113, 131, 151, 163, 181, 211, 223, 233, 241, 251, 263, 281, 283, 311, 313, 331, 353, 383, 401, 421, 431, 433, 443, 461, 463, 503, 521, 523, 541, 563, 601, 613, 631, 641, 643, 653, 661, 683, 811, 821, 823
Offset: 1

Views

Author

Jason Bard, Jul 20 2025

Keywords

Crossrefs

Intersection of A038615 and A038617.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 2, 3, 4, 5, 6, 8]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 7] == 0 && DigitCount[#, 10, 9] == 0 &]
  • PARI
    primes_with(, 1, [0, 1, 2, 3, 4, 5, 6, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("01234568"), 41))) # uses function/imports in A385776
    

A155008 Primes p such that (p-a)*(p+a)-+a*p are primes,a=4.

Original entry on oeis.org

3, 5, 7, 11, 19, 29, 31, 59, 101, 139, 239, 271, 829, 1031, 1201, 1439, 1511, 1531, 2251, 2609, 3929, 4349, 4969, 5449, 5639, 5711, 5801, 5881, 5981, 6521, 6569, 6701, 6949, 6959, 8221, 8831, 9001, 9181, 9209, 9419, 9511, 9929, 10139, 10711, 11839, 11981
Offset: 1

Views

Author

Keywords

Comments

3*11-28=5, 3*11+28=61, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-4)*(p+4)-4*p]&&PrimeQ[(p-4)*(p+4)+4*p],AppendTo[lst,p]],{n,7!}];lst
    Select[Prime[Range[1500]],AllTrue[(#-4)(#+4)+{4#,-4#},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 27 2020 *)

A155009 Primes p such that (p-a)*(p+a)-+a*p are primes,a=5.

Original entry on oeis.org

2, 7, 11, 17, 19, 23, 41, 43, 61, 67, 107, 109, 131, 137, 179, 197, 263, 269, 331, 353, 397, 641, 677, 743, 859, 941, 1163, 1171, 1213, 1303, 1319, 1433, 1447, 1453, 1543, 1601, 1783, 2221, 2351, 2371, 2417, 2503, 2657, 2689, 2791, 2797, 2909, 3037, 3301
Offset: 1

Views

Author

Keywords

Comments

1*12-35=-23, 1*12+35=47; 6*16-55=96-55=41, 6*16-55=96+55=151, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-5)*(p+5)-5*p]&&PrimeQ[(p-5)*(p+5)+5*p],AppendTo[lst,p]],{n,7!}];lst
    Select[Prime[Range[500]],AllTrue[(#-5)(#+5)+{5#,-5#},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 01 2016 *)

A224321 Primes without "7" as a digit that remain prime when any single digit is replaced with "7".

Original entry on oeis.org

2, 3, 5, 11, 13, 19, 31, 41, 43, 61, 109, 139, 251, 643, 4933, 9433, 36493, 191416111, 1304119699
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 03 2013

Keywords

Comments

No more terms < 10^13.

Crossrefs

Cf. A224319-A224320, A224322. Subsequence of A038615.

Programs

  • Mathematica
    lst = {}; n = 7; Do[If[PrimeQ[p], i = IntegerDigits[p]; If[FreeQ[i, n], t = 0; s = IntegerLength[p]; Do[If[PrimeQ@FromDigits@Insert[Drop[i, {d}], n, d], t++, Break[]], {d, s}]; If[t == s, AppendTo[lst, p]]]], {p, 36493}]; lst
    Select[Prime[Range[4000]],DigitCount[#,10,7]==0&&AllTrue[FromDigits/@Table[ReplacePart[ IntegerDigits[#],n->7],{n,IntegerLength[#]}],PrimeQ]&] (* The program generates the first 17 terms of the sequence. *) (* Harvey P. Dale, Jun 09 2024 *)

A154942 Primes p such that (p-1)*p*(p+1)-p-2 and (p-1)*p*(p+1)+p+2 are primes.

Original entry on oeis.org

3, 5, 29, 71, 113, 263, 1103, 2339, 3203, 3413, 3593, 3659, 3719, 4421, 5939, 6269, 7841, 9011, 9029, 13121, 13841, 14423, 15671, 17033, 19073, 22079, 22811, 26783, 27851, 28949, 29303, 30839, 31973, 32063, 32141, 34301, 38543, 38873, 39119
Offset: 1

Views

Author

Keywords

Comments

2*3*4=24-3-2=19, 2*3*4=24+3+2=29, ...

Crossrefs

Programs

  • Mathematica
    lst={};Do[p=Prime[n];If[PrimeQ[(p-1)*p*(p+1)-p-2]&&PrimeQ[(p-1)*p*(p+1)+p+2],AppendTo[lst,p]],{n,8!}];lst
    prQ[n_]:=Module[{x=n^3-n,y=n+2},And@@PrimeQ[{x+y,x-y}]]; Select[Prime[ Range[4200]],prQ] (* Harvey P. Dale, Jun 21 2012 *)
Previous Showing 11-20 of 30 results. Next