login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A120431 Numbers k such that k and k+2 are prime powers. 8

%I #32 Sep 08 2022 08:45:25

%S 1,2,3,5,7,9,11,17,23,25,27,29,41,47,59,71,79,81,101,107,125,137,149,

%T 167,179,191,197,227,239,241,269,281,311,347,359,419,431,461,521,569,

%U 599,617,641,659,727,809,821,827,839,857,881,1019,1031,1049,1061,1091

%N Numbers k such that k and k+2 are prime powers.

%C Twin prime powers, a generalization of the twin primes. The twin primes are a subsequence.

%C From _Daniel Forgues_, Aug 17 2009: (Start)

%C Numbers k such that k + (0, 2) is a prime power pair.

%C k + (0, 2m), m >= 1, being an admissible pattern for prime pairs has high density.

%C k + (0, 2m-1), m >= 1, being a non-admissible pattern for prime pairs, has low density [the only possible pairs are (2^a - 2m-1, 2^a) or (2^a, 2^a + 2m-1), a >= 0.] (End)

%H Amiram Eldar, <a href="/A120431/b120431.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1270 from Daniel Forgues)

%F a(n) = A064076(n-2) for n >= 3. - _Georg Fischer_, Nov 02 2018

%e a(5) = 7 since the 5th pair of twin prime powers is (7,9), while the first four pairs are (1,3), (2,4), (3,5) and (5,7).

%p isppow := proc(n) local pf; pf := ifactors(n)[2]; if nops(pf) = 1 or n =1 then true; else false; fi; end; isA120431 := proc(n) RETURN (isppow(n) and isppow(n+2)); end; for n from 1 to 1500 do if isA120431(n) then printf("%d, ",n); fi; od; # _R. J. Mathar_, Dec 16 2006

%t Join[{1}, Select[Range[1100], And@@PrimePowerQ/@{#, # + 2} &]] (* _Vincenzo Librandi_, Nov 03 2018 *)

%o (PARI) is(n)=if(n<4,return(n>0)); isprimepower(n) && isprimepower(n+2) \\ _Charles R Greathouse IV_, Apr 24 2015

%o (Magma) [1] cat [n: n in [2..1200] | IsPrimePower(n) and IsPrimePower(n+2)]; // _Vincenzo Librandi_, Nov 03 2018

%Y Cf. A001359, A000961, A064076.

%Y Cf. A006549, A164571, A164572, A164573, A164574.

%K nonn

%O 1,2

%A _Greg Huber_, Jul 13 2006

%E More terms from _R. J. Mathar_, Dec 16 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)