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

A160670 Duplicate of A145985.

Original entry on oeis.org

7, 5, 3, 89, 83, 71, 59, 53, 47, 41, 29, 17, 11, 3, 887, 863, 827, 821, 809, 773, 761, 743, 719, 683, 653, 647, 641, 617, 599, 569, 557, 521, 509, 491, 479, 443, 431, 401, 383, 359, 353, 347, 317, 281, 257, 239, 227, 191, 179, 173, 137, 113, 89, 71, 59, 53, 47, 29
Offset: 1

Views

Author

Enoch Haga, May 23 2009

Keywords

Comments

Previous name was: Primes in A160668 in order of appearance.

Crossrefs

Programs

  • UBASIC
    10 'recipseq, Enoch Haga, May 22 2009
    20 N=3:print N:C=2
    30 A=3:S=sqrt(N)
    40 B=N/A
    50 if A*B=int(N) then 70
    60 A=A+2:if A
    				

A358310 Index in A145985 where n-th odd prime p first appears, or -1 if p never appears.

Original entry on oeis.org

3, 2, 1, 13, -1, 12, -1, 59, 11, -1, -1, 10, -1, 9, 8, 7, -1, -1, 6, -1, -1, 5, 4, -1, 2528242167, -1
Offset: 1

Author

Harvey P. Dale and N. J. A. Sloane, Dec 16 2022

Keywords

Comments

Let p = prime(n+1). Certainly if p == 1 (mod 6) then p cannot appear in A145985 (because 10^k-p will be a multiple of 3), so a(n) = -1. In all other cases it appears that a(n) > 0.
a(27) (corresponding to the prime 107) is presently unknown.

Examples

			The 8th odd prime 23 first occurs in A145985 at index 59, so a(8) = 59.
For n=25, the 25th odd prime is 101. The first time when 10^k - 101 is a prime is when k = 12, where 10^12 - 101 = 999999999899. Furthermore, when we look at the numbers t = 10^12 - q for q an increasing prime, t is a prime for q = 11, 41, 101, ..., that is, 101 is the third success.  It follows that 101 is three steps back from the end of the 12th block of descending terms in A145985. The lengths of the blocks are given by A359120. Therefore a(25) = Sum_{j=1..12} A359120(j) - (3-1) = 2528242169 - 2 = 2528242167. - _N. J. A. Sloane_, Dec 18 2022
		

Crossrefs

Cf. A145985.

Programs

  • Mathematica
    With[{prs=Prime[Range[20000000]]},Table[Position[Select[Table[10^IntegerLength[p]-p,{p,prs}],PrimeQ],n,1,1],{n,Prime[Range[24]]}]]/.({}->-1) (* Harvey P. Dale, Dec 17 2022 *)

Extensions

a(25) from N. J. A. Sloane, Dec 18 2022

A068811 Numbers k such that k and its 10's complement (10^d-k, where d is the number of digits in k) are both primes.

Original entry on oeis.org

3, 5, 7, 11, 17, 29, 41, 47, 53, 59, 71, 83, 89, 97, 113, 137, 173, 179, 191, 227, 239, 257, 281, 317, 347, 353, 359, 383, 401, 431, 443, 479, 491, 509, 521, 557, 569, 599, 617, 641, 647, 653, 683, 719, 743, 761, 773, 809, 821, 827, 863, 887, 911, 929, 941
Offset: 1

Author

Amarnath Murthy, Mar 07 2002

Keywords

Comments

In other words, primes p such that the difference between the smallest power of 10 exceeding p and p is prime. - Zak Seidov, Feb 27 2004
a(n) = 10^d - A145985(n), where d is the number of digits in A145985(n). - N. J. A. Sloane, Dec 18 2022
The only twin prime pairs in the sequence are (3,5) and (5,7). This is easily seen by mod 6 congruences using 10^k = 4 (mod 6). - Giuseppe Coppoletta, Jul 24 2016

Examples

			47 is a prime; the smallest power of 10 exceeding 47 is 100 and 100 - 47 = 53 is prime. Therefore 47 is in the sequence.
641 is a term as 641 and 1000-641 = 359 are primes.
		

Crossrefs

Cf. A145985.

Programs

  • Maple
    a:=[];
    for i from 1 to 1000 do
    p:=ithprime(i); d:=length(p); q:=10^d-p;
    if isprime(q) then a:=[op(a),p]; fi; od:
    a; # N. J. A. Sloane, Dec 18 2022
  • Mathematica
    Select[Prime[Range[160]], PrimeQ[10^(Floor[Log[10, # ]] + 1) - # ] &] (* Stefan Steinerberger, Jun 15 2007 *)
  • PARI
    is_A068811(p)= isprime(10^#Str(p)-p) & isprime(p) \\ M. F. Hasler, May 01 2012
    
  • PARI
    for(d=1, 4, forprime(p=10^(d-1), 10^d, if(isprime(10^d-p), print1(p", ")))) \\ Charles R Greathouse IV, May 01 2012
    
  • Sage
    [p for p in prime_range(100) if is_prime(10^p.ndigits()-p)] # Giuseppe Coppoletta, Jul 24 2016

Extensions

Corrected by Jason Earls, May 25 2002
Edited by N. J. A. Sloane, Sep 18 2008 at the suggestion of R. J. Mathar
Showing 1-3 of 3 results.