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 31-40 of 126 results. Next

A122781 Nonprimes n such that 4^n==4 (mod n).

Original entry on oeis.org

1, 4, 6, 12, 15, 28, 66, 85, 91, 186, 276, 341, 435, 451, 532, 561, 645, 703, 946, 1068, 1105, 1247, 1271, 1387, 1581, 1695, 1729, 1891, 1905, 2044, 2046, 2047, 2071, 2465, 2701, 2821, 2926, 3133, 3277, 3367, 3683, 4033, 4369, 4371, 4681, 4795
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 12 2006

Keywords

Comments

If both numbers q and 2q-1 are prime, then q*(2q-1) is in the sequence. So, A005382(n)*(2*A005382(n)-1) = A129521(n) form a subsequence.

Crossrefs

Contains A020136, A001567, A006935 (except n=2), and A129521 as subsequences.
Cf. A005382.

Programs

  • Maple
    for n from 1 to 5000 do if 4^n mod n = 4 mod n and not isprime(n) then print(n) fi od; # Gary Detlefs, May 14 2012
  • Mathematica
    Select[Range[4800], ! PrimeQ[ # ] && Mod[4^#, # ] == Mod[4, # ] &]
    Join[{1,4},Select[Range[5000],!PrimeQ[#]&&PowerMod[4,#,#]==4&]] (* Harvey P. Dale, Apr 09 2018 *)

A181715 Length of the complete Cunningham chain of the second kind starting with prime(n).

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 17 2010

Keywords

Comments

Number of iterations x -> 2x-1 needed to get a composite number, when starting with prime(n).
Dickson's conjecture implies that, for every positive integer r, there exist infinitely many n such that a(n) = r. - Lorenzo Sauras Altuzarra, Feb 12 2021
a(n) is the least k such that 2^k * (prime(n)-1) + 1 is composite. Note that a(n) is well defined since 2^(p-1) * (p-1) + 1 is divisible by p for odd primes p. - Jianing Song, Nov 24 2021

Examples

			2 -> 3 -> 5 -> 9 = 3^2, so a(1) = 3 and a(2) = 2. - _Jonathan Sondow_, Oct 30 2015
		

Crossrefs

Programs

  • Maple
    a := proc(n)
       local c, l:
       c, l := 0, ithprime(n):
       while isprime(l) do c, l := c+1, 2*l-1: od:
       c:
    end: # Lorenzo Sauras Altuzarra, Feb 12 2021
  • Mathematica
    Table[p = Prime[n]; cnt = 1; While[p = 2*p - 1; PrimeQ[p], cnt++]; cnt, {n, 100}] (* T. D. Noe, Jul 12 2012 *)
    Table[-1 + Length@ NestWhileList[2 # - 1 &, Prime@ n, PrimeQ@ # &], {n, 98}] (* Michael De Vlieger, Apr 26 2017 *)
  • PARI
    a(n)= n=prime(n); for(c=1,1e9, is/*pseudo*/prime(n=2*n-1) || return(c))

Formula

a(n) < prime(n) for n > 1; see Löh (1989), p. 751. - Jonathan Sondow, Oct 28 2015
max(a(n), A181697(n)) = A263879(n) for n > 2. - Jonathan Sondow, Oct 30 2015
a(n) = A285700(A000040(n)). - Antti Karttunen, Apr 26 2017

Extensions

Escape clause added to definition by N. J. A. Sloane, Feb 19 2021
Escape clause deleted from definition by Jianing Song, Nov 24 2021

A038549 Least number with exactly n divisors that are at most its square root.

Original entry on oeis.org

1, 4, 12, 24, 36, 60, 192, 120, 180, 240, 576, 360, 1296, 900, 720, 840, 9216, 1260, 786432, 1680, 2880, 15360, 3600, 2520, 6480, 61440, 6300, 6720, 2359296, 5040, 3221225472, 7560, 46080, 983040, 25920, 10080, 206158430208, 32400, 184320
Offset: 1

Views

Author

Keywords

Comments

Least number of identical objects that can be arranged in exactly n ways in a rectangle, modulo rotation.
Smallest number which has n distinct unordered factorizations of the form x*y. - Lekraj Beedassy, Jan 09 2008
Note that an upper bound on a(n) is 3*2^(n-1), which is attained at n = 4 and the odd primes in A005382 (primes p such that 2p-1 is also prime). - T. D. Noe, Jul 13 2013

Crossrefs

Cf. A038548 (records), A072671, A004778, A086921.
Cf. A227068 (similar, but with limit < sqrt).

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a038549 = (+ 1) . fromJust . (`elemIndex` a038548_list)
    -- Reinhard Zumkeller, Dec 26 2012
  • Mathematica
    nn = 18; t = Table[0, {nn}]; found = 0; n = 0; While[found < nn, n++; c = Length[Select[Divisors[n], # <= Sqrt[n] &]]; If[c > 0 && c <= nn && t[[c]] == 0, t[[c]] = n; found++]]; t (* T. D. Noe, Jul 10 2013 *)

Formula

a(n) = min(A005179(2n-1), A005179(2n)).

Extensions

More terms from David W. Wilson.

A069142 Primes p such that p+2, 2p+1, and 2p+3 are also prime.

Original entry on oeis.org

5, 29, 659, 809, 2129, 2549, 3329, 3389, 5849, 6269, 10529, 33179, 41609, 44129, 53549, 55439, 57329, 63839, 65099, 70379, 70979, 72269, 74099, 74759, 78779, 80669, 81929, 87539, 93239, 102299, 115469, 124769, 133979, 136949, 156419
Offset: 1

Views

Author

Neil Fernandez, Apr 08 2002

Keywords

Comments

Previous name: Lower prime in a twin pair that yields another.
a(n) gives the terms for A005382(i)-A005384(j)=2. - J. M. Bergot, Mar 12 2015

Examples

			659 and 661 form a prime twin pair. Their sum is 1320. 1320 is sandwiched between 1319 and 1321, which form another prime twin pair. So 659 is in the sequence.
		

Crossrefs

Cf. A014574.
Cf. A066388.

Programs

  • Magma
    [p: p in PrimesUpTo(160000) | IsPrime(p+2) and IsPrime(2*p+1) and IsPrime(2*p+3)]; // Vincenzo Librandi, Apr 09 2013
    
  • Mathematica
    p = q = 1; Do[q = Prime[n]; If[p + 2 == q && PrimeQ[2p + 1] && PrimeQ[2p + 3], Print[p]]; p = q, {n, 1, 10^4}]
    Select[Prime[Range[15000]], PrimeQ[# + 2] && PrimeQ[2 # + 1] && PrimeQ[2 # + 3]&] (* Vincenzo Librandi, Apr 09 2013 *)
  • PARI
    forprime(p=1,10^5,if(isprime(p+2)&&isprime(2*p+1)&&isprime(2*p+3),print1(p,", "))) \\ Derek Orr, Mar 11 2015

Formula

a(n) = A066388(n)-1. - R. J. Mathar, Nov 02 2023

Extensions

Edited and extended by Robert G. Wilson v, Apr 11 2002

A105610 Numbers k such that both p1=2k+3 and p2=4k+5 are primes.

Original entry on oeis.org

0, 2, 8, 14, 17, 38, 47, 68, 77, 98, 104, 113, 134, 152, 164, 167, 182, 188, 218, 248, 272, 287, 299, 302, 308, 329, 344, 362, 404, 413, 437, 467, 482, 497, 503, 533, 584, 617, 638, 647, 698, 713, 728, 764, 803, 812, 827, 878, 932, 1004, 1013, 1043, 1064, 1067
Offset: 1

Views

Author

Zak Seidov, Apr 15 2005

Keywords

Comments

p1 in A005382, p2 in A005383.

Crossrefs

Equals A123998 minus 1.

Programs

  • Mathematica
    Select[Range[0,1067], PrimeQ[2#+3]&&PrimeQ[4#+5]&] (* James C. McMahon, Jan 26 2024 *)
  • Python
    from sympy import isprime
    print([ k for k in range(0,1068) if isprime(2*k+3) and isprime(4*k+5)])
    # Karl-Heinz Hofmann, Jan 27 2024

A020137 Pseudoprimes to base 8.

Original entry on oeis.org

9, 21, 45, 63, 65, 105, 117, 133, 153, 231, 273, 341, 481, 511, 561, 585, 645, 651, 861, 949, 1001, 1105, 1281, 1365, 1387, 1417, 1541, 1649, 1661, 1729, 1785, 1905, 2047, 2169, 2465, 2501, 2701, 2821, 3145, 3171, 3201, 3277, 3605, 3641, 4005, 4033, 4097
Offset: 1

Views

Author

Keywords

Comments

This sequence is a subsequence of the sequence A122785. In fact the terms are odd composite terms of A122785. Theorem: If both numbers q and 2q-1 are primes (q is in the sequence A005382) and n=q*(2q-1) then 8^(n-1)==1 (mod n) (n is in the sequence) iff q is of the form 12k+1. 2701,18721,49141,104653,226801,665281,721801,... is the related subsequence. This subsequence is also a subsequence of the sequence A122785. - Farideh Firoozbakht, Sep 15 2006
Composite numbers k such that 8^(k-1) == 1 (mod k). - Michel Lagneau, Feb 18 2012
If q and 3q-2 are odd primes, then q*(3q-2) is in the sequence. - Davide Rotondo, May 25 2021

Crossrefs

Cf. A001567 (pseudoprimes to base 2), A005382, A122783, A122785.

Programs

  • Mathematica
    Select[Range[4100], ! PrimeQ[ # ] && PowerMod[8, (# - 1), # ] == 1 &] (* Farideh Firoozbakht, Sep 15 2006 *)

A068080 Integers n such that n + phi(n) is a prime.

Original entry on oeis.org

1, 2, 3, 7, 15, 19, 31, 33, 35, 37, 51, 65, 69, 77, 79, 85, 91, 95, 97, 133, 139, 141, 143, 145, 157, 159, 161, 177, 187, 199, 209, 211, 213, 215, 217, 229, 235, 247, 255, 267, 271, 299, 303, 307, 319, 331, 335, 337, 339, 341, 345, 365, 367, 371, 379, 391, 393
Offset: 1

Views

Author

Amarnath Murthy, Feb 17 2002

Keywords

Comments

The subsequence of prime terms is given by A005382. - Michel Marcus, Aug 22 2015

Crossrefs

Cf. A050530.

Programs

  • Magma
    [n: n in [1..400] |IsPrime(n+EulerPhi(n))]; // Vincenzo Librandi, Dec 19 2015
  • Mathematica
    Select[Range[400], PrimeQ[# + EulerPhi[#]] &] (* Carl Najafi, Aug 22 2011 *)
  • PARI
    isok(n) = isprime(n+eulerphi(n)); \\ Michel Marcus, Aug 22 2015
    

Extensions

Edited and extended by Robert G. Wilson v, Feb 18 2002

A246373 Primes p such that if 2p-1 = product_{k >= 1} A000040(k)^(c_k), then p <= product_{k >= 1} A000040(k-1)^(c_k).

Original entry on oeis.org

2, 3, 7, 19, 29, 31, 37, 47, 67, 71, 79, 89, 97, 101, 103, 107, 109, 127, 139, 151, 157, 181, 191, 197, 199, 211, 223, 227, 229, 241, 251, 269, 271, 277, 283, 307, 317, 331, 337, 349, 359, 367, 373, 379, 397, 409, 421, 433, 439, 457, 461, 467, 487, 499, 521, 541, 547, 569, 571, 577, 601
Offset: 1

Views

Author

Antti Karttunen, Aug 25 2014

Keywords

Comments

Primes p such that A064216(p) >= p, or equally, A064989(2p-1) >= p.
All primes of A005382 are present here, because if 2p-1 is prime q, Bertrand's postulate guarantees (after cases 2 and 3 which are in A048674) that there exists at least one prime r larger than p and less than q = 2p-1, for which A064989(q) = r.

Examples

			2 is present, as 2*2 - 1 = 3 = p_2, and p_{2-1} = p_1 = 2 >= 2.
3 is present, as 2*3 - 1 = 5 = p_3, and p_{3-1} = p_2 = 3 >= 3.
5 is not present, as 2*5 - 1 = 9 = p_2 * p_2, and p_1 * p_1 = 4, with 4 < 5.
7 is present, as 2*7 - 1 = 13 = p_6, and p_5 = 11 >= 7.
		

Crossrefs

Intersection of A000040 and A246372.
Subsequence: A005382.
A246374 gives the primes not here.

Programs

  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    n = 0; forprime(p=2,2^31, if((A064989((2*p)-1) >= p), n++; write("b246373.txt", n, " ", p); if(n > 9999, break)));
    (Scheme, with Antti Karttunen's IntSeq-library)
    (define A246373 (MATCHING-POS 1 1 (lambda (n) (and (prime? n) (>= (A064216 n) n)))))

A105652 Numbers k such that p1=2k+3, p2=4k+5 and p3=6k+7 are all prime.

Original entry on oeis.org

0, 2, 17, 104, 134, 152, 164, 167, 299, 362, 584, 617, 647, 764, 827, 1109, 1139, 1277, 1517, 1529, 1532, 2129, 2222, 2399, 2474, 2612, 2789, 2924, 3074, 3179, 3344, 3419, 3482, 3809, 3839, 3842, 3932, 4007, 4082, 4094, 4142, 4259, 4262, 4322, 4469, 4544
Offset: 1

Views

Author

Zak Seidov, Apr 16 2005

Keywords

Comments

Except for 0, all terms == 2 or 14 (mod 15). - Robert Israel, Jun 08 2018

Crossrefs

Programs

  • Magma
    [n: n in [0..5000] | IsPrime(2*n+3) and IsPrime(4*n+5) and IsPrime(6*n+7)]; // Vincenzo Librandi, Nov 13 2010
  • Maple
    select(k -> andmap(isprime, [2*k+3,4*k+5,6*k+7]), [0, seq(seq(15*i+j,j=[2,14]),i=0..1000)]); # Robert Israel, Jun 08 2018

Formula

a(n) = (A174734(n)-3)/2. - Robert Israel, Jun 08 2018

A120628 Primes such that their double is 1 away from a prime number.

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23, 29, 31, 37, 41, 53, 79, 83, 89, 97, 113, 131, 139, 157, 173, 179, 191, 199, 211, 229, 233, 239, 251, 271, 281, 293, 307, 331, 337, 359, 367, 379, 419, 431, 439, 443, 491, 499, 509, 547, 577, 593, 601, 607, 619, 641, 653, 659, 661, 683
Offset: 1

Views

Author

Cino Hilliard, Aug 17 2006

Keywords

Comments

This sequence is a variation of the sequence in the reference. However this sequence should have an infinite number of terms.

Examples

			19 is a prime and 19*2 = 38 which is one away from 37 which is prime.
13 is not in the table because 13*2 = 26 is one away from 25 and 27 both not prime.
		

References

  • R. Crandall and C. Pomerance, Prime Numbers A Computational Perspective, Springer Verlag 2002, p. 49, exercise 1.18.

Crossrefs

Programs

  • Mathematica
    Select[Range[683], PrimeQ[#] && Or[PrimeQ[2 # - 1], PrimeQ[2 # + 1]] &]  (* Ant King, Dec 12 2010 *)
    Select[Prime[Range[200]],AnyTrue[2#+{1,-1},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 26 2020 *)
  • PARI
    primepm2(n,k) { local(x,p1,p2,f1,f2,r); if(k%2,r=2,r=1); for(x=1,n, p1=prime(x); p2=prime(x+1); if(isprime(p1*k+r)||isprime(p1*k-r), print1(p1",") ) ) }
Previous Showing 31-40 of 126 results. Next