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 51-59 of 59 results.

A385721 Primes in A386964.

Original entry on oeis.org

2, 23, 2357, 2357137939171, 2357137939171373, 23571379391713739, 2357137939171373917139397137, 2357137939171373917139397137937179, 235713793917137391713939713793717991737391137913793911739171337137177939739397199113939713, 2357137939171373917139397137937179917373911379137939117391713371371779397393971991139397137971939131
Offset: 1

Views

Author

Rajsaday Dutt, Aug 04 2025

Keywords

Comments

From Michael S. Branicky, Aug 12 2025: (Start)
Also, numbers b(k) such that b(k) is prime, where b(1) = prime(1) = 2, b(n) = 10*b(n-1) + (prime(n) mod 10), as noted in Comments in A276481.
a(n) has A276481(n) digits, so a(14) has 7923 digits. (End)

Crossrefs

Programs

  • Mathematica
    a[1]=2; a[n_]:=10a[n-1]+Mod[Prime[n], 10];Select[Array[a,100],PrimeQ] (* James C. McMahon, Aug 16 2025 *)

Formula

a(n) = A386964(A276481(n)). - Michael S. Branicky, Aug 12 2025

A071775 Continued fraction for C = 0.23571379....the concatenation of final decimal digits of primes.

Original entry on oeis.org

0, 4, 4, 8, 103, 1, 1, 1, 1, 1, 3, 1, 2, 47, 1, 1, 2, 3, 1, 1, 1, 2, 2, 5, 1, 11, 2, 2, 8, 1, 7, 1, 19, 1, 1, 1, 1, 105, 1, 4, 12, 1, 1, 1, 3, 4, 1, 2, 4, 3, 3, 1, 1, 4, 1, 4, 3, 8, 4, 2, 1, 3, 5, 1, 1, 3, 28, 1, 3, 2, 1, 1, 1, 4, 1, 2, 2, 1, 32, 1, 8, 2, 2, 11, 1, 7, 1, 2, 5, 2, 1, 1, 2, 3, 1, 1, 1, 1
Offset: 1

Views

Author

Benoit Cloitre, Jun 24 2002

Keywords

Crossrefs

Cf. A007652.

Programs

  • Mathematica
    With[{c=FromDigits[NumberDigit[#,0]&/@ Prime[ Range[ 500]]]}, ContinuedFraction[ c/10^IntegerLength[c]]] (* Requires Mathematica version 12 or later *) (* Harvey P. Dale, Jul 03 2021 *)
  • PARI
    \p200 contfrac(sum(n=0,100,(prime(n)%10)*10^-n))

A090724 Defined in Comments lines.

Original entry on oeis.org

4, 1, 3, 5, 3, 4, 1, 3, 4, 1, 3, 5, 5, 2, 0, 5, 2, 4, 1, 6, 3, 3, 0, 6, 4, 2, 3, 5, 2, 3, 1, 4, 2, 3, 3, 5, 5, 2, 0, 3, 5, 3, 1, 3, 5, 3, 1, 6, 3, 1, 0, 5, 5, 2, 0, 5, 2, 4, 3, 5, 2, 4, 2, 3, 4, 3, 1, 6, 3, 3, 3, 4, 5, 2, 2, 3, 3, 2, 0, 3, 5, 2, 3, 4, 4, 1, 3, 5, 3, 3, 0, 4, 5, 2, 0, 6, 2, 3, 2, 6, 3, 1, 2, 5, 5
Offset: 4

Views

Author

Roger L. Bagula, Jan 18 2004

Keywords

Comments

1. Start with the sequence of final digits of primes (A007652), beginning at 7 so that all members of this sequence will be either 1,3,7, or 9: {7,1,3,7,9,3,9,1,7,1,3,7,3,9,1,7,1,3,...}.
2. Replace all 3's with 6's, all 1's with 3's, all 7's with 5's and all 9's with 4's: {5,3,6,5,4,6,4,3,5,3,6,5,6,4,3,5,3,6, ...}.
3. Subtract (n mod 4) from the n-th member of this sequence (i.e. subtract 1 from the first, 5th, 9th, 13th, ... members, subtract 2 from the 2nd, 6th, 10th, ... members and subtract 3 from the 3rd, 7th, 11th,... members) to get the final sequence: {4,1,3,5,3,4,1,3,4,1,3,5,5,2,0,5,2,4, ...}.
The {0,1,2,3,4,5,6} symbols coded onto the modulo 4 cycle {1,2,3,4} by the prime digits set {1,3,7,9}.

Programs

  • Mathematica
    ReplaceAll[Table[Mod[Prime[n+3], 10], {n, 200}], {1->3, 3->6, 7->5, 9->4}]-Table[Mod[n, 4], {n, 200}]

A093337 Penultimate digits of the primes.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 0, 0, 0, 0, 1, 2, 3, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 9, 9, 9, 9, 1, 2, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 0, 1, 1, 1, 3, 3, 4, 4, 5, 5, 6, 7, 7, 8, 8, 9, 0, 0, 1, 2, 3, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 9, 9, 0, 0, 2, 2, 4, 4, 5, 6, 6, 7, 7, 8, 9, 9
Offset: 11

Views

Author

Cino Hilliard, Apr 25 2004

Keywords

Crossrefs

Programs

  • Magma
    [Intseq(p)[2]: p in PrimesInInterval(11,600)]; // Bruno Berselli, Feb 14 2013
  • Mathematica
    IntegerDigits[#][[-2]]&/@Prime[Range[5,110]] (* Harvey P. Dale, Apr 08 2019 *)
  • PARI
    penult(n) = { forprime(x=11,n, s = Str(x); ln = length(s); pu = mid(s,ln-1,1); print1(pu",") ) } \ Get a substring of length n from string str starting at position s in str. mid(str,s,n) = { v =""; tmp = Vec(str); ln=length(tmp); for(x=s,s+n-1, v=concat(v,tmp[x]); ); return(v) }
    

A247025 Lengths of prefixes of the infinite string of digits repeat(1379) that are prime.

Original entry on oeis.org

2, 3, 7, 81, 223, 250, 255, 537, 543, 1042, 2103, 4285, 25015, 35361, 43525
Offset: 1

Views

Author

Mark E. Shoulson, Sep 09 2014

Keywords

Comments

Every prime > 5 in base 10 ends in 1, 3, 7, or 9. If those digits are repeated, in order, some prefixes of that string are prime.
n such that floor(1379/9999 * 10^n) is prime. - Robert Israel, Sep 09 2014
a(13) > 15500. - Daniel Starodubtsev, Mar 16 2021

Examples

			1 and 3 are the first two digits of the string, and 13 is prime. 13 has length 2, so 2 is a term.
137 is prime and three digits long, so 3 is a term.
1379137 is prime and seven digits long, so 7 is a term.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..300] | IsPrime(Floor(1379/9999 * 10^n))]; // Vincenzo Librandi, Oct 17 2014
  • Mathematica
    Select[Range[4300],PrimeQ[FromDigits[PadRight[{},#,{1,3,7,9}]]]&] (* The program generates the first 12 terms of the sequence. *) (* Harvey P. Dale, Jun 11 2024 *)
  • PARI
    lista(nn) = {s = 0; digs = [1,3,7,9]; id = 1; for (n=1, nn, s = 10*s + digs[id]; if (isprime(s), print1(n, ", ")); id++; if (id==5, id = 1););} \\ Michel Marcus, Oct 11 2014
    
  • Python
    from sympy import isprime
    from itertools import cycle
    it=cycle([1,3,7,9])
    c=0
    a=0
    for i in it:
        c+=1
        a*=10
        a+=i
        if isprime(a):
            print(c)
    

Extensions

Edited. Name specified. Example reformulated. a(12) added (using R. Israel's formula). Keyword less and Crossreferences added. - Wolfdieter Lang, Nov 03 2014
a(13)-a(14) from Michael S. Branicky, May 29 2023
a(15) from Michael S. Branicky, Jun 13 2024

A268185 a(n) = prime(n) + last digit of prime(n).

Original entry on oeis.org

4, 6, 10, 14, 12, 16, 24, 28, 26, 38, 32, 44, 42, 46, 54, 56, 68, 62, 74, 72, 76, 88, 86, 98, 104, 102, 106, 114, 118, 116, 134, 132, 144, 148, 158, 152, 164, 166, 174, 176, 188, 182, 192, 196, 204, 208, 212, 226, 234, 238, 236, 248, 242, 252, 264
Offset: 1

Views

Author

Emre APARI, Jan 28 2016

Keywords

Comments

All terms are even.

Examples

			For the prime 19, we have: 19 + (19 modulo 10) = 28.
		

Crossrefs

Programs

  • Magma
    [NthPrime(n) + (NthPrime(n) mod 10): n in [1..60]]; // Vincenzo Librandi, Jan 31 2016
  • Mathematica
    Table[Prime[n] + Mod[Prime[n], 10], {n, 100}] (* Alonso del Arte, Jan 28 2016 *)
  • PARI
    a(n) = prime(n) + prime(n) % 10; \\ Michel Marcus, Jan 28 2016
    
  • PARI
    lista(nn) = {forprime(p=2, nn, print1(p + p % 10, ", "));} \\ Altug Alkan, Feb 04 2016
    

Formula

a(n) = prime(n) + (prime(n) mod 10).
a(n) = A000040(n) + A007652(n).

A277097 a(n) = 5 - (prime(n) mod 10).

Original entry on oeis.org

3, 2, 0, -2, 4, 2, -2, -4, 2, -4, 4, -2, 4, 2, -2, 2, -4, 4, -2, 4, 2, -4, 2, -4, -2, 4, 2, -2, -4, 2, -2, 4, -2, -4, -4, 4, -2, 2, -2, 2, -4, 4, 4, 2, -2, -4, 4, 2, -2, -4, 2, -4, 4, 4, -2, 2, -4, 4, -2, 4, 2, 2, -2, 4, 2, -2, 4, -2, -2, -4, 2
Offset: 1

Views

Author

Dimitris Valianatos, Sep 29 2016

Keywords

Comments

Except for a(1)=3 and a(3)=5 the entries are either {-4, -2, 2, 4} and occur in roughly equal ratios. - Robert G. Wilson v, Nov 04 2016

Examples

			For n = 10 and prime(10) = 29, so a(10) = 5 - 9 = -4.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := 5 - Mod[Prime[n], 10]; Array[f, 71] (* Robert G. Wilson v, Nov 04 2016 *)
  • PARI
    a(n) = my(p=prime(n)); (10*(p\10)+5) - p; \\ Michel Marcus, Sep 30 2016

Formula

a(n) = 5 - A007652(n). - Robert G. Wilson v, Nov 04 2016

A297847 Sexiness of p = prime(n): number of iterations of the function f(x) = x + 6 that leave p prime.

Original entry on oeis.org

0, 0, 4, 2, 3, 1, 2, 0, 1, 0, 2, 1, 3, 0, 2, 1, 0, 3, 2, 0, 1, 0, 1, 0, 2, 2, 1, 1, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 1, 0, 0, 3, 2, 1, 0, 2, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 2, 0, 1, 0, 2, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Felix Fröhlich, Jan 07 2018

Keywords

Comments

a(n) > 0 iff p is a term of A023201.
a(n) = 0 iff p is a term of A140555.
a(n) = 2 iff p is a term of A046118.
a(n) > 2 iff p is a term of A023271.
a(n) < 4 except for n = 3. Proof: The last digits of the numbers in the progression repeat 1, 7, 3, 9, 5, 1, 7, 3, 9, 5, ..., so a(n) is at most 4, which only happens for p = 5, since A007652(n) = 5 only for n = 3.

Examples

			For n = 13: prime(13) = 41 and 41 remains prime through exactly 3 iterations of f(x) = x + 6, since 47, 53 and 59 are prime, but 65 is composite, so a(13) = 3.
		

Crossrefs

Programs

  • Mathematica
    Array[-2 + Length@ NestWhileList[# + 6 &, Prime@ #, PrimeQ] &, 105] (* Michael De Vlieger, Jan 11 2018 *)
  • PARI
    a(n) = my(p=prime(n), x=p, i=0); while(1, x=x+6; if(!ispseudoprime(x), return(i), i++))

A330968 Prime numbers p such that 2*p - last digit of p is prime.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 23, 31, 37, 43, 53, 59, 67, 79, 83, 113, 139, 157, 179, 193, 199, 211, 223, 229, 233, 263, 271, 277, 283, 307, 331, 359, 367, 373, 389, 397, 409, 419, 433, 443, 457, 487, 509, 547, 563, 569, 601, 613, 619, 643, 653, 661, 691, 709, 719, 727
Offset: 1

Views

Author

Dimitris Valianatos, Feb 06 2020

Keywords

Comments

Prime numbers p such that 2*p - (p mod 10) is prime.

Examples

			Prime number 19 is a term since 2 * 19 - (19 mod 10) = 2 * 19 - 9 = 29, a prime.
		

Crossrefs

Programs

  • Magma
    [p:p in PrimesUpTo(750)| IsPrime(2*p-(p mod 10))]; // Marius A. Burtea, Feb 07 2020
  • PARI
    forprime(p = 2, 1000, if(isprime(2*p - p%10), print1(p", ")))
    
Previous Showing 51-59 of 59 results.