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

A063983 Least k such that k*2^n +/- 1 are twin primes.

Original entry on oeis.org

4, 2, 1, 9, 12, 6, 3, 9, 57, 30, 15, 99, 165, 90, 45, 24, 12, 6, 3, 69, 132, 66, 33, 486, 243, 324, 162, 81, 90, 45, 345, 681, 585, 375, 267, 426, 213, 429, 288, 144, 72, 36, 18, 9, 147, 810, 405, 354, 177, 1854, 927, 1125, 1197, 666, 333, 519, 1032, 516, 258, 129, 72
Offset: 0

Views

Author

Robert G. Wilson v, Sep 06 2001

Keywords

Comments

Excluding the first three terms, all remaining terms have digital root 3, 6, or 9. - J. W. Helkenberg, Jul 24 2013

Examples

			a(3) = 9 because 9*2^3 = 72 and 71 and 73 are twin primes.
a(6) = 3 because 3*2^6 = 192 and {191, 193} are twin primes.
a(71) = 630 because 630*2^71 = 1487545442103938242314240 and {1487545442103938242314239, 1487545442103938242314241} are twin primes.
		

References

  • Richard Crandall and Carl Pomerance, 'Prime Numbers: A Computational Perspective,' Springer-Verlag, NY, 2001, page 12.

Crossrefs

Cf. A071256, A060210, A060256. For records see A125848, A125019.
Cf. A076806 (requires odd k).

Programs

  • Mathematica
    Table[Do[s=(2^j)*k; If[PrimeQ[s-1]&&PrimeQ[s+1],Print[{j,k}]], {k,1,2*j^2}],{j,0,100}]; (* outprint of a[j]=k *)
    Do[ k = 1; While[ ! PrimeQ[ k*2^n + 1 ] || ! PrimeQ[ k*2^n - 1 ], k++ ]; Print[ k ], {n, 0, 50} ]
    f[n_] := Block[{k = 1},While[Nand @@ PrimeQ[{-1, 1} + 2^n*k], k++ ];k];Table[f[n], {n, 0, 60}] (* Ray Chandler, Jan 09 2009 *)

Extensions

More terms from Labos Elemer, May 24 2002
Edited by N. J. A. Sloane, Jul 03 2008 at the suggestion of R. J. Mathar

A158034 Integers n for which f = (4^n - 2^n + 8n^2 - 2) / (2n * (2n + 1)) is an integer.

Original entry on oeis.org

3, 11, 23, 83, 131, 179, 191, 239, 243, 251, 359, 419, 431, 443, 491, 659, 683, 719, 743, 891, 911, 1019, 1031, 1103, 1223, 1439, 1451, 1499, 1511, 1539, 1559, 1583, 1811, 1931, 2003, 2039, 2063, 2211, 2339, 2351, 2399, 2459, 2511, 2543, 2699, 2819, 2903
Offset: 1

Views

Author

Reikku Kulon, Mar 11 2009

Keywords

Comments

Superset of A002515; 2n + 1 is prime. A recursive search for members of this sequence results in the infinite series of very large primes A145918. Most members of this sequence are also prime, but five members less than 10000 are composite:
.. . 243 = 3^5
.. . 891 = 3^4 * 11
. . 1539 = 3^4 * 19
. . 2211 = 3 * 11 * 67
. . 2511 = 3^4 * 31
The polygonal number with f sides of length 2n + 1 is (2^n - 1)(2^(n - 1)).
Contribution from Reikku Kulon, May 19 2009: (Start)
The average difference between successive composite terms gradually increases, remaining near their order of magnitude. Roughly 3% of all primes less than 20 billion belong to this sequence or the 2n + 1 sequence. The interval between composite terms 12228632879 and 13169544651 contains 1113606 primes, accounting for 2.75% of the primes in the interval and 1.42% of the primes between 24457265759 and 26339089303.
Prime factors are most often congruent to 3 (mod 4), but some factors are congruent to 1 (mod 4), especially when a term has an even number of not necessarily distinct factors. The most common factor is 3, and often a large power of 3 is a divisor. 5, 7, 13, and 17 are never factors.
The ones digit of composite terms is most often 1, and becomes progressively more likely to be 1. It is never 5. It cannot be 7, because 2n + 1 would then be divisible by 5. The lack of solutions with n divisible by 5 appears crucial to the consistent primality of 2n + 1.
The tens digit is odd if the ones digit is 1 or 9; it is even if the ones digit is 3. This is a consequence of congruence to 3 (mod 4).
The most common least significant two digits of composite terms are 51.
The least significant digits of prime terms do not follow an obvious distribution.
This is the simplest and possibly most productive member of a family of similar sequences defined by f = (s + 8n^2 - 2) / (2n * (2n + 1)), where s is pronic. For these sequences, 2n + 1 is dominated by primes.
=====================================
Large sequences of consecutive primes
=====================================
. Initial term Primes Predecessor Successor Gap
. ---------------------------------------------------------------
. 1529648303 157285 1529648231 1639846391 110198160
. 3832649339 473045 3832647111 4193496803 360849692
. 5897103683 411434 5897102751 6223464171 326361420
. 6543227423 445293 6543226251 6899473631 356247380
. 8126586971 913506 8126586711 8871331491 744744780
. 9533381219 689395 9533380131 10103115231 569735100
. 11576086883 708712 11576086731 12171829419 595742688
. 12228633251 1113606 12228632879 13169544651 940911772
. 21315457451 2328623 21315457251 23375077119 2059619868
(End)

Examples

			ngon(f, k) = k * (f * (k - 1) / 2 - k + 2)
. . . 3 = (4^3 - 2^3 + 8 * 9 - 2) / (6 * 7)
. . . . = (2 * 28 + 70) / 42
. . 126 = (2 * 28 + 70)
.. . 28 = (2^3 - 1) * 2^2
. . . . = 126 - 70 - 28
. . . . = 7 * (18 - 10 - 4)
. . . . = 7 * (3 * 6 - 3 * 3 - 5)
. . . . = 7 * (3 * 3 - 7 + 2)
.. 8287 = (4^11 - 2^11 + 8 * 121 - 2) / (22 * 23)
. . . . = (2 * 2096128 + 966) / 506
4193222 = (2 * 2096128 + 966)
2096128 = (2^11 - 1) * 2^10
. . . . = 4193222 - 2096128 - 966
. . . . = 23 * (182314 - 91136 - 42)
. . . . = 23 * (8287 * 22 - 8287 * 11 - 21)
. . . . = 23 * (8287 * 11 - 23 + 2)
Coincidentally, 8287 = 129 * 64 + 31 = 257 * 32 + 63 is prime, and may be the largest value of f that is.
1031 = 257 * 4 + 3 and 2063 = 1031 * 2 + 1 are both members of this sequence, 4127 = 2063 * 2 + 1 is prime, and 8287 = (4127 + 16) * 2 + 1.
		

Crossrefs

Cf. A002515 (Lucasian primes)
Cf. A145918 (exponential Sophie Germain primes)
Cf. A139601 (polygonal numbers)
Cf. A046318, A139876 (related to composite members 243, 891, 1539, and 2511)
Cf. A060210, A002034, A109833, A136801 (their factors)
Cf. A039506 (3, 8287)
Cf. A006516 (2^n - 1)(2^(n - 1))
Cf. A000051 (Fermat numbers), A019434 (Fermat primes)
Cf. A142291 (prime sequence 257, 1031, 2063, 4127)
Cf. A235540 (nonprimes), A002943.

Programs

  • Haskell
    a158034 n = a158034_list !! (n-1)
    a158034_list = [x | x <- [1..],
                        (4^x - 2^x + 8*x^2 - 2) `mod` (2*x*(2*x + 1)) == 0]
    -- Reinhard Zumkeller, Jan 12 2014

A071407 Least k such that k*prime(n) + 1 and k*prime(n) - 1 are twin primes.

Original entry on oeis.org

2, 2, 6, 6, 18, 24, 6, 12, 6, 12, 42, 54, 30, 24, 6, 120, 18, 258, 24, 18, 84, 132, 54, 48, 114, 42, 6, 6, 48, 24, 144, 30, 6, 12, 12, 78, 24, 36, 30, 54, 132, 18, 90, 36, 66, 18, 42, 30, 120, 30, 36, 42, 18, 18, 54, 84, 60, 12, 210, 12, 6, 60, 150, 102, 6, 210, 30, 24, 6
Offset: 1

Views

Author

Labos Elemer, May 24 2002

Keywords

Comments

Note that 6 divides a(n) for n > 2. - T. D. Noe, Jan 07 2013

Examples

			n=4: prime(4)=7, a(4)=6 because 6*prime(4)=42 and {41,43} are primes.
		

Crossrefs

Cf. A071558 (k at every integer).
Cf. A220141, A220142 (record values).

Programs

  • Haskell
    a071407 n = head [k | k <- [2,4..], let x = k * a000040 n,
                          a010051' (x - 1) == 1, a010051' (x + 1) == 1]
    -- Reinhard Zumkeller, Feb 14 2013
  • Mathematica
    Table[fl=1; Do[s=(Prime[j])*k; If[PrimeQ[s-1]&&PrimeQ[s+1]&&Equal[fl, 1], Print[{j, k}]; fl=0], {k, 1, 2*j^2}], {j, 0, 100}]

Formula

From Amiram Eldar, Aug 25 2025: (Start)
a(n) = A090530(n) / prime(n).
a(n) = 6 * A294731(n) for n >= 3. (End)

A118701 Largest prime power that divides the average of twin-prime pairs.

Original entry on oeis.org

4, 3, 4, 9, 5, 7, 5, 9, 17, 27, 23, 25, 9, 64, 11, 19, 16, 27, 47, 13, 29, 7, 27, 11, 29, 19, 25, 103, 107, 11, 81, 137, 23, 13, 49, 17, 43, 25, 59, 13, 128, 41, 71, 43, 31, 11, 17, 121, 19, 31, 67, 81, 139, 283, 41, 149, 16, 313, 23, 25, 37, 169, 347, 29, 64
Offset: 1

Views

Author

Greg Huber, Jul 13 2006

Keywords

Examples

			a(10) = 27 since the 10th twin-prime pair is (107, 109) and 108 = 4*27.
		

Crossrefs

Programs

  • Mathematica
    Max[Power @@@ FactorInteger[#]] & /@ (Select[Prime[Range[350]], PrimeQ[# + 2] &] + 1) (* Amiram Eldar, May 25 2024 *)
  • PARI
    maxpow(n) = {my(f = factor(n)); if(n == 1, 1, vecmax(vector(#f~, i, f[i,1]^f[i,2])));}
    lista(pmax) = {my(prev = 2); forprime(p = 3, pmax, if(p == prev + 2, print1(maxpow(p - 1), ", ")); prev = p);} \\ Amiram Eldar, May 25 2024

Formula

a(n) = A034699(A014574(n)). - Amiram Eldar, May 25 2024

Extensions

More terms from Amiram Eldar, May 25 2024

A178668 Maximal prime divisor of the average of the twin prime pairs, different from 2 and 3. In case of maximal prime divisor is 2 or 3, then a(n)=1.

Original entry on oeis.org

1, 1, 1, 1, 5, 7, 5, 1, 17, 1, 23, 5, 5, 1, 11, 19, 5, 5, 47, 13, 29, 7, 1, 11, 29, 19, 5, 103, 107, 11, 5, 137, 23, 13, 7, 17, 43, 7, 59, 13, 1, 41, 71, 43, 31, 11, 17, 11, 19, 31, 67, 5, 139, 283, 41, 149, 13, 313, 23, 13, 37, 13, 347, 29, 11, 71, 17, 373, 7, 11, 13, 397, 17, 1, 443, 7, 113, 13, 31, 467, 11, 5, 13, 11, 271, 181, 11, 37, 7, 281, 113, 577, 17, 7, 59, 593, 199, 17, 157, 13
Offset: 1

Views

Author

Vladimir Shevelev, Dec 25 2010

Keywords

Comments

78 from the first 100 terms are first or second members of twin pairs and only 12 are not. In a natural supposition that for large prime terms the latter should be in the majority, there are reasons to assume that the number N for which it occurs for the first time is very large.
The average of a twin-prime pair is the same as 1 + the lower twin prime, whose largest prime factor is tabulated in A060210.

Crossrefs

Programs

  • Mathematica
    s = Plus @@@ Select[ Partition[ Prime@ Range@ 350, 2, 1], #[[1]] + 2 == #[[2]] &]; f[n_] := Max[First /@ FactorInteger@ n] /. {2 -> 1, 3 -> 1}, f /@ s
Showing 1-5 of 5 results.