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!)
A128280 a(n) is the least number not occurring earlier such that a(n)+a(n-1) is prime, a(0) = 0. 19

%I #27 Jul 19 2021 01:19:58

%S 0,2,1,4,3,8,5,6,7,10,9,14,15,16,13,18,11,12,17,20,21,22,19,24,23,30,

%T 29,32,27,26,33,28,25,34,37,36,31,40,39,44,35,38,41,42,47,50,51,46,43,

%U 54,49,48,53,56,45,52,55,58,69,62,65,66,61,70,57,74,63,64,67,60,71,68,59

%N a(n) is the least number not occurring earlier such that a(n)+a(n-1) is prime, a(0) = 0.

%C Original definition: start with a(1) = 2. See A055265 for start with a(1) = 1.

%C The sequence may well be a rearrangement of natural numbers. Interestingly, subsets of first n terms are permutations of 1..n for n = {2, 4, 8, 10, 18, 22, 24, 56, ...}. E.g., first 56 terms: {2, 1, 4, 3, 8, 5, 6, 7, 10, 9, 14, 15, 16, 13, 18, 11, 12, 17, 20, 21, 22, 19, 24, 23, 30, 29, 32, 27, 26, 33, 28, 25, 34, 37, 36, 31, 40, 39, 44, 35, 38, 41, 42, 47, 50, 51, 46, 43, 54, 49, 48, 53, 56, 45, 52, 55} are a permutation of 1..56.

%C Without altering the definition nor the existing values, one can as well start with a(0) = 0 and get (conjecturally) a permutation of the nonnegative integers. This sequence is in some sense the "arithmetic" analog of the "digital" variant A231433: Here we add subsequent terms, there the digits are concatenated. - _M. F. Hasler_, Nov 09 2013

%C The sequence is also a particular case of "among the pairwise sums of any M consecutive terms, N are prime", with M = 2, N = 1. For other M, N see A329333, A329405 ff, A329449 ff and the OEIS Wiki page. - _M. F. Hasler_, Nov 24 2019

%H Lars Blomberg, <a href="/A128280/b128280.txt">Table of n, a(n) for n = 0..9999</a>

%H M. F. Hasler, <a href="/wiki/User:M._F._Hasler/Prime_sums_from_neighboring_terms">Prime sums from neighboring terms</a>, OEIS wiki, Nov. 23, 2019.

%F a(2n-1) = A055265(2n-1) + 1, a(2n) = A055265(2n) - 1, for all n >= 1. - _M. F. Hasler_, Feb 11 2020

%o (PARI) {a=0;u=0; for(n=1, 99, u+=1<<a; print1(a", "); for(k=1, 9e9, bittest(u, k)&&next; isprime(a+k)&&(a=k)&&next(2)))}

%Y Cf. A083236.

%Y Cf. A055265 for the variant starting with a(1) = 1, and A329333, A329405, ..., A329425 and A329449, ..., A329581 for other variants. - _M. F. Hasler_, Nov 24 2019

%K nonn

%O 0,2

%A _Zak Seidov_, May 03 2007

%E Initial a(0) = 0 prefixed by _M. F. Hasler_, Nov 09 2013

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 August 19 08:00 EDT 2024. Contains 375284 sequences. (Running on oeis4.)