Original entry on oeis.org
2, 3, 7, 13, 23, 31, 43, 59, 73, 97, 127, 149, 167, 193, 227, 263, 283, 311, 349, 389, 421, 463, 509, 557, 601, 653, 709, 769, 823, 881, 947, 997, 1061, 1123, 1193, 1277, 1367, 1439, 1531, 1607, 1693, 1787, 1861, 1949, 2017, 2099, 2179, 2281, 2377, 2477
Offset: 1
A254337
Lexicographically earliest sequence of distinct numbers such that no sum of consecutive terms is prime.
Original entry on oeis.org
0, 1, 8, 6, 10, 14, 12, 4, 20, 16, 24, 18, 22, 28, 26, 34, 30, 32, 36, 40, 42, 46, 38, 44, 52, 48, 54, 50, 58, 56, 62, 64, 60, 66, 68, 72, 70, 74, 80, 76, 78, 86, 82, 84, 90, 92, 94, 88, 98, 96, 104, 100, 102, 108, 110, 112, 114, 106, 116, 122, 118, 120, 124, 126, 130, 132, 134, 128, 138, 136, 142, 140, 144, 146, 148, 150, 154, 152, 156, 158
Offset: 0
To explain the beginning of the sequence, observe that starting with the smallest possible terms 0, 1 does not appear to lead to a contradiction (and in fact never does), so we start there.
The next composite would be 4 but 1+4=5 is prime, as is 1+6, but 1+8=9 is not, so we take a(2) = 8 to be the next term.
4 is impossible for a(3) since 1+8+4=13 is prime, but neither 1+8+6=15 nor 8+6 is prime, so a(3)=6.
Cf.
A025044 (no pairwise sum is prime),
A025043 (no pairwise difference is prime).
-
f[lst_List] := Block[{k = 1}, While[ PrimeQ@ k || MemberQ[lst, k] || Union@ PrimeQ@ Accumulate@ Reverse@ Join[lst, {k}] != {False}, k++]; Append[lst, k]]; Nest[f, {0}, 70] (* Robert G. Wilson v, Jan 31 2015 *)
-
a=[];u=0; for(i=1,99, a=concat(a,0); until( ! isprime(s) || ! a[i]++, while( isprime(a[i]) || bittest(u,a[i]), a[i]++); s=a[k=i]; while( k>1 && ! isprime( s+=a[k--]),)); u+=2^a[i]; print1(a[i]","))
A073659
a(1) = 1; for n > 1, a(n) is the smallest even number not already in the sequence such that a(1) + ... + a(n) is a prime.
Original entry on oeis.org
1, 2, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, 36, 20, 28, 38, 40, 32, 42, 46, 48, 44, 52, 56, 60, 54, 58, 66, 50, 64, 62, 70, 84, 90, 72, 92, 76, 86, 94, 74, 88, 68, 82, 80, 102, 96, 100, 114, 98, 78, 112, 120, 110, 108, 106, 126, 122, 130, 132, 134, 124, 128, 118
Offset: 1
See
A055265 for a version where the sums of two adjacent terms are primes.
-
t = {1}; Do[i = 2; While[! PrimeQ[Total[t] + i] || MemberQ[t, i], i += 2]; AppendTo[t, i], {65}]; t (* Jayanta Basu, Jul 04 2013 *)
-
v=[1];n=1;while(n<200,if(isprime(n+vecsum(v))&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0);n++);v \\ Derek Orr, Jun 01 2015
A180405
Smallest integer not yet present in the sequence such that the sum of the first a(n) terms of the sequence is a prime.
Original entry on oeis.org
2, 1, 4, 6, 3, 7, 8, 10, 11, 15, 12, 18, 14, 16, 22, 24, 19, 31, 28, 20, 23, 37, 36, 30, 26, 34, 29, 35, 42, 38, 40, 32, 39, 45, 52, 44, 54, 46, 56, 60, 43, 51, 50, 64, 84, 48, 49, 53, 68, 58, 62, 78, 70, 66, 57, 59, 82, 92, 90, 88, 63, 77, 72, 94, 67, 79, 76, 102, 71, 81, 96, 100
Offset: 1
Examples replaced with a comment by
R. J. Mathar, Nov 18 2010
A292388
Lexicographically earliest sequence of distinct positive terms such that, for any n > 0, SumXOR_{k=1..n} a(k) is prime (where SumXOR is the analog of summation under the binary XOR operation).
Original entry on oeis.org
2, 1, 4, 5, 7, 6, 8, 9, 15, 10, 12, 14, 18, 16, 20, 17, 19, 22, 24, 26, 32, 30, 36, 28, 38, 34, 40, 42, 44, 43, 21, 50, 39, 29, 48, 45, 31, 52, 46, 58, 54, 62, 55, 41, 56, 60, 66, 68, 72, 74, 64, 78, 84, 76, 63, 57, 80, 86, 88, 94, 90, 92, 100, 70, 96, 98, 82
Offset: 1
a(1) cannot equal 1 (1 is not prime).
a(1) = 2 is suitable.
a(2) = 1 is suitable.
a(3) cannot equal 1 (already used), 2 (already used) or 3 (2 XOR 1 XOR 3 = 0 is not prime).
a(3) = 4 is suitable.
a(4) cannot equal 1 (already used), 2 (already user), 3 (2 XOR 1 XOR 4 XOR 3 = 4 is not prime) or 4 (already used).
a(4) = 5 is suitable.
-
s=0; x=0; for (n=1, 67, for (v=1, oo, if (!bittest(s,v) && isprime(bitxor(x,v)), s+=2^v; x=bitxor(x,v); print1 (v ", "); break)))
A122866
Consider the array of sequences defined to be "the least previously nonoccurring positive integer such that partial sum + k is prime" beginning with k=0. This sequence is the main diagonal of that array.
Original entry on oeis.org
2, 3, 6, 4, 12, 10, 16, 12, 16, 24, 26, 24, 30, 28, 28, 44, 36, 42, 20, 38, 34, 54, 54, 56, 48, 44, 50, 52, 68, 56, 56, 60, 62, 66, 66, 70, 76, 84, 76, 58, 92, 90, 88, 90, 80, 88, 92, 102, 104, 102, 114, 104, 108, 98, 114, 108, 92, 100, 120, 126, 124, 130, 126, 142, 116, 126
Offset: 0
The array of sequences begins
k= 0: 2, 1, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, ...,.
k= 1: 1, 3, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, ...,.
k= 2: 1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, ...,.
k= 3: 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, ...,.
k= 4: 1, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, ...,.
k= 5: 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, 28, ...,.
-
f[s_] := Append[s, k = 1; p = q + Plus @@ s; While[MemberQ[s, k] || !PrimeQ[p + k], k++ ]; k]; T[n_, k_] := Nest[q = k; f, {}, n][[ -1]]; Table[T[n, n - 1], {n, 66}]
A122867
Consider the array of sequences defined to be "the least previously nonoccurring positive integer such that partial sum + k is prime" beginning with k=0. This sequence is that array read by successive antidiagonals.
Original entry on oeis.org
2, 1, 1, 1, 3, 4, 2, 2, 2, 6, 1, 6, 6, 4, 10, 2, 2, 8, 8, 6, 8, 1, 4, 4, 4, 4, 12, 12, 4, 4, 6, 6, 14, 14, 8, 16, 3, 2, 2, 12, 12, 10, 10, 10, 14, 2, 2, 6, 6, 8, 8, 12, 12, 14, 24, 1, 6, 4, 10, 10, 10, 10, 20, 20, 18, 30, 2, 2, 12, 6, 8, 8, 14, 14, 18, 18, 22, 22, 1, 4, 4, 8, 8, 16, 16, 18, 18, 16
Offset: 1
The array of sequences begins
k= 0: 2, 1, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, ...,.
k= 1: 1, 3, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, ...,.
k= 2: 1, 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, ...,.
k= 3: 2, 6, 8, 4, 14, 10, 12, 20, 18, 16, 24, 26, 28, 32, 34, ...,.
k= 4: 1, 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, ...,.
k= 5: 2, 4, 6, 12, 8, 10, 14, 18, 22, 26, 24, 16, 30, 32, 28, ...,.
-
f[s_] := Append[s, k = 1; p = q + Plus @@ s; While[MemberQ[s, k] || !PrimeQ[p + k], k++ ]; k]; T[n_, k_] := Nest[q = k; f, {}, n][[ -1]]; Table[T[k, n - k], {n, 13}, {k, n}] // Flatten
A287662
a(n) is the smallest positive integer not already in sequence such that a(1) + ... + a(n) is a prime power, with a(1) = 1.
Original entry on oeis.org
1, 2, 4, 6, 3, 7, 8, 10, 12, 11, 9, 16, 14, 18, 28, 20, 22, 32, 33, 13, 24, 38, 30, 36, 34, 26, 42, 48, 40, 44, 46, 50, 60, 52, 68, 54, 58, 5, 15, 64, 78, 56, 66, 70, 74, 76, 84, 62, 72, 82, 90, 80, 55, 21, 92, 106, 104, 88, 98, 100, 96, 108, 102, 86, 114, 94, 116, 118, 122, 120, 130, 126, 107, 31, 132, 138
Offset: 1
a(8) = 10 because 1, 2, 3, 4, 6, 7 and 8 have already been used in the sequence, 1 + 2 + 4 + 6 + 3 + 7 + 8 + 5 = 36 is not prime power, 1 + 2 + 4 + 6 + 3 + 7 + 8 + 9 = 40 is not prime power while 1 + 2 + 4 + 6 + 3 + 7 + 8 + 10 = 41 is a prime power.
-
t = {1}; Do[i = 1; While[! PrimePowerQ[Total[t] + i] || MemberQ[t, i], i++]; AppendTo[t, i], {75}]; t
A330536
The partial sum a(1)+...+a(n) is prime, and so is the sum of the digits used by those n terms.
Original entry on oeis.org
2, 1, 4, 6, 24, 22, 8, 42, 28, 60, 26, 46, 44, 40, 68, 66, 112, 158, 64, 86, 84, 118, 62, 88, 20, 48, 156, 114, 136, 138, 132, 150, 116, 82, 192, 176, 190, 392, 198, 172, 152, 178, 240, 206, 174, 282, 244, 80, 154, 242, 204, 202, 228, 170, 246, 130, 648, 110, 756, 196, 194, 222, 208, 266, 286, 284, 280, 200
Offset: 1
The successive partial sums of terms are prime:
(2), (2 + 1) = 3, (2 + 1 + 4) = 7; (2 + 1 + 4 + 6) = 13; (2 + 1 + 4 + 6 + 24) = 37; etc.
The successive partial sums of their digits are also prime:
(2), (2 + 1) = 3, (2 + 1 + 4) = 7; (2 + 1 + 4 + 6) = 13; (2 + 1 + 4 + 6 + 2 + 4) = 19; etc.
Cf.
A054408 (smallest positive integer not already in sequence such that the partial sum a(1)+...+a(n) is prime).
-
Nest[Append[#, Block[{k = 1}, While[Nand[FreeQ[#, k], PrimeQ[Total@ # + k], PrimeQ@ Total@ Flatten@ IntegerDigits[Append[#, k]]], k++]; k]] &, {}, 68] (* Michael De Vlieger, Dec 17 2019 *)
A366170
Lexicographically earliest sequence of distinct positive integers such that for n>1, Sum_{i=1..n, a(i)<=n} a(a(i)) is prime.
Original entry on oeis.org
1, 2, 4, 8, 6, 12, 5, 7, 10, 18, 13, 11, 14, 16, 17, 24, 20, 22, 21, 15, 19, 26, 3, 23, 9, 30, 28, 32, 31, 29, 40, 42, 34, 36, 37, 44, 35, 27, 41, 50, 46, 39, 33, 56, 47, 52, 68, 49, 43, 54, 53, 51, 60, 58, 57, 45, 66, 55, 61, 74, 64, 63, 84, 72, 67, 78, 65, 59, 70, 90, 73, 80
Offset: 1
At [1,2], the terms at indices i=1 and i=2, namely 1 and 2, sum to 3, a prime.
At [1,2,4], i=4 is not the index of a term in the sequence yet, so the sum remains the same.
At [1,2,4,8], the sum of the terms at i=1,2,4 is a(1)=1 + a(2)=2 + a(4)=8, which is 11, a prime number.
Showing 1-10 of 11 results.
Comments