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

%I #6 Jan 12 2014 10:12:37

%S 3,11,23,83,131,179,191,239,243,251,359,419,431,443,491,659,683,719,

%T 743,891,911,1019,1031,1103,1223,1439,1451,1499,1511,1539,1559,1583,

%U 1811,1931,2003,2039,2063,2211,2339,2351,2399,2459,2511,2543,2699,2819,2903

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

%C 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:

%C .. . 243 = 3^5

%C .. . 891 = 3^4 * 11

%C . . 1539 = 3^4 * 19

%C . . 2211 = 3 * 11 * 67

%C . . 2511 = 3^4 * 31

%C The polygonal number with f sides of length 2n + 1 is (2^n - 1)(2^(n - 1)).

%C Contribution from _Reikku Kulon_, May 19 2009: (Start)

%C 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.

%C 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.

%C 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.

%C 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).

%C The most common least significant two digits of composite terms are 51.

%C The least significant digits of prime terms do not follow an obvious distribution.

%C 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.

%C =====================================

%C Large sequences of consecutive primes

%C =====================================

%C . Initial term Primes Predecessor Successor Gap

%C . ---------------------------------------------------------------

%C . 1529648303 157285 1529648231 1639846391 110198160

%C . 3832649339 473045 3832647111 4193496803 360849692

%C . 5897103683 411434 5897102751 6223464171 326361420

%C . 6543227423 445293 6543226251 6899473631 356247380

%C . 8126586971 913506 8126586711 8871331491 744744780

%C . 9533381219 689395 9533380131 10103115231 569735100

%C . 11576086883 708712 11576086731 12171829419 595742688

%C . 12228633251 1113606 12228632879 13169544651 940911772

%C . 21315457451 2328623 21315457251 23375077119 2059619868

%C (End)

%H Reinhard Zumkeller, <a href="/A158034/b158034.txt">Table of n, a(n) for n = 1..1000</a>

%e ngon(f, k) = k * (f * (k - 1) / 2 - k + 2)

%e . . . 3 = (4^3 - 2^3 + 8 * 9 - 2) / (6 * 7)

%e . . . . = (2 * 28 + 70) / 42

%e . . 126 = (2 * 28 + 70)

%e .. . 28 = (2^3 - 1) * 2^2

%e . . . . = 126 - 70 - 28

%e . . . . = 7 * (18 - 10 - 4)

%e . . . . = 7 * (3 * 6 - 3 * 3 - 5)

%e . . . . = 7 * (3 * 3 - 7 + 2)

%e .. 8287 = (4^11 - 2^11 + 8 * 121 - 2) / (22 * 23)

%e . . . . = (2 * 2096128 + 966) / 506

%e 4193222 = (2 * 2096128 + 966)

%e 2096128 = (2^11 - 1) * 2^10

%e . . . . = 4193222 - 2096128 - 966

%e . . . . = 23 * (182314 - 91136 - 42)

%e . . . . = 23 * (8287 * 22 - 8287 * 11 - 21)

%e . . . . = 23 * (8287 * 11 - 23 + 2)

%e Coincidentally, 8287 = 129 * 64 + 31 = 257 * 32 + 63 is prime, and may be the largest value of f that is.

%e 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.

%o (Haskell)

%o a158034 n = a158034_list !! (n-1)

%o a158034_list = [x | x <- [1..],

%o (4^x - 2^x + 8*x^2 - 2) `mod` (2*x*(2*x + 1)) == 0]

%o -- _Reinhard Zumkeller_, Jan 12 2014

%Y Cf. A002515 (Lucasian primes)

%Y Cf. A145918 (exponential Sophie Germain primes)

%Y Cf. A139601 (polygonal numbers)

%Y Cf. A046318, A139876 (related to composite members 243, 891, 1539, and 2511)

%Y Cf. A060210, A002034, A109833, A136801 (their factors)

%Y Cf. A039506 (3, 8287)

%Y Cf. A006516 (2^n - 1)(2^(n - 1))

%Y Cf. A000051 (Fermat numbers), A019434 (Fermat primes)

%Y Cf. A142291 (prime sequence 257, 1031, 2063, 4127)

%Y Cf. A235540 (nonprimes), A002943.

%K easy,nonn

%O 1,1

%A _Reikku Kulon_, Mar 11 2009