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

A139367 a(n) = A102700(n) - A102342(n).

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 3, 2, 4, 4, 6, 4, 4, 9, 8, 7, 7, 7, 7, 7, 5, 2, 3, 2, 2, 4, 4, 7, 10, 10, 9, 9, 8, 7, 5, 6, 9, 7, 13, 13, 13, 11, 12, 14, 15, 23, 16, 16, 16, 10, 10, 16, 13, 13, 13, 13, 12, 7, 10, 7, 1, 1, 1, 4, 6, 5, 9, 9, 13, 11, 16, 13, 13, 15, 13, 8, 9, 8, 10, 9, 10, 6, 7, 7, 10, 10, 11, 18
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jun 09 2008

Keywords

Comments

a(332) = -1.

Programs

  • Maple
    From R. J. Mathar, Apr 25 2010: (Start)
    A102700 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if isprime(10*a+9) then return a; end if; end do: end if; end proc:
    A102342 := proc(n) option remember; if n = 1 then 0; else for a from procname(n-1)+1 do if isprime(10*a+7) then return a; end if; end do: end if; end proc:
    A139367 := proc(n) A102700(n)-A102342(n) ; end proc: seq(A139367(n),n=1..120) ; (End)

Extensions

Corrected (a 6 replaced by 7, a 7 by 9, a 13 by 16) and extended by R. J. Mathar, Apr 25 2010

A030433 Primes of form 10*k + 9.

Original entry on oeis.org

19, 29, 59, 79, 89, 109, 139, 149, 179, 199, 229, 239, 269, 349, 359, 379, 389, 409, 419, 439, 449, 479, 499, 509, 569, 599, 619, 659, 709, 719, 739, 769, 809, 829, 839, 859, 919, 929, 1009, 1019, 1039, 1049, 1069, 1109, 1129, 1229, 1249, 1259, 1279, 1289
Offset: 1

Views

Author

Keywords

Comments

Also primes of form 5*k + 4.
5 is quadratic residue of primes of form 10*k-1. - Vincenzo Librandi, Jun 25 2014
Also, primes p such that 5 divides sigma(p), cf. A274397. - M. F. Hasler, Jul 10 2016
Conjecture: Primes p such that ((x+1)^5-1)/x has 2 distinct irreducible factors of degree 2 over GF(p). - Federico Provvedi, Apr 01 2018
The digital root of a(n) is 1, 2, 4, 5, 7 or 8. - Muniru A Asiru, Apr 28 2018
From Jianing Song, Sep 13 2022: (Start)
Primes p such that the ideal (p) factors into two prime ideals in Z[zeta_5], where zeta_5 = exp(2*Pi*i/5). Since Z[zeta_5] is a PID, this is equivalent to saying that this sequence lists primes p that are the product of two non-associate prime elements Z[zeta_5]. In particular, the factorization of p == 4 (mod 5) in Z[zeta_5] coincides with the factorization in Z[(1+sqrt(5))/2] (e.g., 19 = (8+3*sqrt(5))*(8-3*sqrt(5)) is the factorization of 19 in both Z[(1+sqrt(5))/2] and Z[zeta_5]).
Also primes p such that x^4 + x^3 + x^2 + x + 1 factors into two irreducible quadratic polynomials over GF(p) (cf. A327753). (End)

Crossrefs

Programs

  • GAP
    Filtered(List([1..500],n->10*n+9),IsPrime); # Muniru A Asiru, Apr 27 2018
  • Maple
    select(isprime,[seq(10*n+9,n=1..500)]); # Muniru A Asiru, Apr 27 2018
  • Mathematica
    Select[Prime@Range[210], Mod[ #, 10] == 9 &] (* Ray Chandler, Nov 07 2006 *)
    Select[Range[9, 1300, 10], PrimeQ] (* Harvey P. Dale, Jun 01 2012 *)
    Prime@Flatten@Position[Length@FactorList[((1+d)^5-1)/d,Modulus->#]&/@Prime@Range@200,3] (* Federico Provvedi, Apr 04 2018 *)
  • PARI
    select(n->n%10==9, primes(100)) \\ Charles R Greathouse IV, Apr 29 2015
    
  • PARI
    for(n=1, 1e3, if(isprime(p=10*n+9), print1(p, ", "))); \\ Altug Alkan, Apr 19 2018
    

Formula

a(n) = 10*A102700(n) + 9.
Union of A132234 and A132236. - Ray Chandler, Apr 07 2009
Intersection of A000040 and A017377. - Iain Fox, Dec 30 2017

Extensions

Extended by Ray Chandler, Nov 07 2006

A007811 Numbers k for which 10k+1, 10k+3, 10k+7 and 10k+9 are primes.

Original entry on oeis.org

1, 10, 19, 82, 148, 187, 208, 325, 346, 565, 943, 1300, 1564, 1573, 1606, 1804, 1891, 1942, 2101, 2227, 2530, 3172, 3484, 4378, 5134, 5533, 6298, 6721, 6949, 7222, 7726, 7969, 8104, 8272, 8881, 9784, 9913, 10111, 10984, 11653, 11929, 12220, 13546, 14416, 15727
Offset: 1

Views

Author

N. J. A. Sloane and J. H. Conway, Mar 15 1996

Keywords

Crossrefs

Programs

  • Haskell
    a007811 n = a007811_list !! (n-1)
    a007811_list = map (pred . head) $ filter (all (== 1) . map a010051') $
       iterate (zipWith (+) [10, 10, 10, 10]) [1, 3, 7, 9]
    -- Reinhard Zumkeller, Jul 18 2014
    
  • Magma
    [n: n in [0..10000] | forall{10*n+r: r in [1,3,7,9] | IsPrime(10*n+r)}]; // Bruno Berselli, Sep 04 2012
    
  • Maple
    for n from 1 to 10000 do m := 10*n: if isprime(m+1) and isprime(m+3) and isprime(m+7) and isprime(m+9) then print(n); fi: od: quit
  • Mathematica
    Select[ Range[ 1, 10000, 3 ], PrimeQ[ 10*#+1 ] && PrimeQ[ 10*#+3 ] && PrimeQ[ 10*#+7 ] && PrimeQ[ 10*#+9 ]& ]
    Select[Range[15000], And @@ PrimeQ /@ ({1, 3, 7, 9} + 10#) &] (* Ray Chandler, Jan 12 2007 *)
  • PARI
    p=2;q=3;r=5;forprime(s=7,1e5,if(s-p==8 && r-p==6 && q-p==2 && p%10==1, print1(p", ")); p=q;q=r;r=s) \\ Charles R Greathouse IV, Mar 21 2013
    
  • Perl
    use ntheory ":all"; my @s = map { ($-1)/10 } sieve_prime_cluster(10,1e9, 2,6,8); say for @s; # _Dana Jacobsen, May 04 2017

Formula

a(n) = 3*A014561(n) + 1. - Zak Seidov, Sep 21 2009

A023240 Primes p such that 10*p + 9 is also prime.

Original entry on oeis.org

2, 5, 7, 13, 17, 19, 23, 37, 41, 43, 47, 59, 61, 71, 73, 83, 101, 103, 127, 131, 139, 149, 157, 197, 199, 223, 233, 239, 257, 269, 271, 281, 293, 307, 311, 331, 349, 353, 373, 401, 409, 421, 433, 463, 467, 479, 491, 499, 503, 509, 541, 547, 563, 577, 587, 593, 607, 619
Offset: 1

Views

Author

Keywords

Crossrefs

Subsequence of A102700.

Programs

  • Magma
    [ n: n in PrimesUpTo(700) | IsPrime(10*n+9) ]; // Vincenzo Librandi, Nov 20 2010
  • Mathematica
    Select[Prime@ Range@ 120, PrimeQ[10 # + 9] &] (* Michael De Vlieger, Sep 12 2016 *)

A049510 Numbers k such that prime(k) == 9 (mod 10).

Original entry on oeis.org

8, 10, 17, 22, 24, 29, 34, 35, 41, 46, 50, 52, 57, 70, 72, 75, 77, 80, 81, 85, 87, 92, 95, 97, 104, 109, 114, 120, 127, 128, 131, 136, 140, 145, 146, 149, 157, 158, 169, 171, 175, 176, 180, 186, 189, 201, 204, 205, 207, 209, 215, 222, 223, 226, 228, 232, 237, 239
Offset: 1

Views

Author

Keywords

Comments

The asymptotic density of this sequence is 1/4 (by Dirichlet's theorem). - Amiram Eldar, Mar 01 2021

Crossrefs

Programs

  • Mathematica
    Select[Range[240], Mod[Prime[ # ], 10] == 9 &] (* Ray Chandler, Nov 07 2006 *)

Formula

a(n) = A000720(A030433(n)). - Ray Chandler, Nov 07 2006

Extensions

Extended by Ray Chandler, Nov 07 2006

A023301 Primes that remain prime through 3 iterations of function f(x) = 10x + 9.

Original entry on oeis.org

13, 139, 293, 331, 547, 967, 1049, 1399, 1567, 1889, 1997, 2087, 2137, 2309, 2423, 2437, 2753, 2939, 3719, 3761, 3919, 4451, 4517, 4621, 6089, 7001, 7741, 8423, 8849, 9437, 10487, 11657, 12007, 12347, 12823, 13469, 15289, 15373, 15661, 17737, 17989
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 10*p+9, 100*p+99 and 1000*p+999 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A023240, A023270, and A102700.

Programs

  • Magma
    [n: n in [1..450000] | IsPrime(n) and IsPrime(10*n+9) and IsPrime(100*n+99) and IsPrime(1000*n+999)] // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    nrp3Q[n_]:=AllTrue[Rest[NestList[10#+9&,n,3]],PrimeQ]; Select[Prime[ Range[ 2100]],nrp3Q] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 12 2019 *)

A104045 Numbers k such that k9 is prime and k is a multiple of ten.

Original entry on oeis.org

10, 40, 50, 70, 80, 100, 110, 140, 160, 170, 230, 260, 290, 310, 320, 370, 440, 490, 500, 520, 530, 670, 710, 730, 800, 820, 860, 910, 920, 1000, 1070, 1090, 1190, 1210, 1240, 1280, 1300, 1310, 1330, 1370, 1400, 1580, 1720, 1750, 1760, 1790, 1900, 1930, 1960, 1970, 2050, 2080, 2210
Offset: 1

Views

Author

Parthasarathy Nambi, Mar 01 2005

Keywords

Examples

			If k =  10, then k9 =  109 (prime).
If k = 160, then k9 = 1609 (prime).
If k = 320, then k9 = 3209 (prime).
		

Crossrefs

Cf. A030433, A008592, A102700, A166560 (resulting primes).

Programs

  • Maple
    select(n-> isprime(10*n+9), [10*i$i=1..300])[];  # Alois P. Heinz, Jan 19 2024
  • Mathematica
    Select[Range[10,2210,10],PrimeQ[FromDigits[Prepend[{9},#]]]&] (* James C. McMahon, Jan 19 2024 *)
  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): yield from (k for k in count(10, 10) if isprime(10*k+9))
    print(list(islice(agen(), 53))) # Michael S. Branicky, Jan 19 2024

A023329 Primes that remain prime through 4 iterations of function f(x) = 10x + 9.

Original entry on oeis.org

13, 139, 293, 1889, 2939, 3719, 6089, 7741, 12823, 19753, 21391, 22861, 28513, 36721, 37967, 40949, 60899, 76519, 83621, 101747, 121687, 127549, 128239, 142099, 149197, 153817, 155581, 158489, 160159, 169283, 173651, 180749, 185831, 192037, 198221
Offset: 1

Views

Author

Keywords

Comments

Primes p such that 10*p+9, 100*p+99, 1000*p+999 and 10000*p+9999 are also primes. - Vincenzo Librandi, Aug 04 2010

Crossrefs

Subsequence of A023240, A023270, A023301, and A102700.

Programs

  • Magma
    [n: n in [1..5000000] | IsPrime(n) and IsPrime(10*n+9) and IsPrime(100*n+99) and IsPrime(1000*n+999) and IsPrime(10000*n+9999)]; // Vincenzo Librandi, Aug 04 2010
  • Mathematica
    Select[Prime[Range[20000]],AllTrue[Rest[NestList[10#+9&,#,4]],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 16 2020 *)

Formula

a(n) == 9 or 13 (mod 14). - John Cerkan, Oct 09 2016

Extensions

Definition clarified by Harvey P. Dale, Feb 16 2020

A153380 Numbers n such that 10*n+9 is not prime.

Original entry on oeis.org

0, 3, 4, 6, 9, 11, 12, 15, 16, 18, 20, 21, 24, 25, 27, 28, 29, 30, 31, 32, 33, 36, 39, 42, 45, 46, 48, 51, 52, 53, 54, 55, 57, 58, 60, 62, 63, 64, 66, 67, 68, 69, 72, 74, 75, 77, 78, 79, 81, 84, 86, 87, 88, 89, 90, 93, 94, 95, 96, 97, 98, 99, 102
Offset: 1

Views

Author

Vincenzo Librandi, Dec 25 2008

Keywords

Examples

			Triangle begins:
0;
*,*;
*,*,4;
*,*,*,*;
*,*,*,*,*;
3,*,*,*,*,16;
*,*,*,*,*,*,*;
*,*,11,*,*,*,*,28;
*,*,*,*,20,*,*,*,*;
*,*,*,*,*,*,*,*,*,*;
6,*,*,*,*,29,*,*,*,*,52;
where * marks the non-integer values of (2*h*k + k + h - 4)/5 with h >= k >= 1. - _Vincenzo Librandi_, Jan 13 2013
		

Crossrefs

Cf. A102700.

Programs

  • Magma
    [n: n in [0..150] | not IsPrime(10*n+9)]; // Vincenzo Librandi, Jan 13 2013
  • Mathematica
    Select[Range[0, 200], !PrimeQ[10 # + 9] &] (* Vincenzo Librandi, Jan 13 2013 *)

Extensions

0 added by Arkadiusz Wesolowski, Aug 03 2011
Showing 1-9 of 9 results.