A082546
Numbers n such that n=A082534(x)=A082534(y), where x
5, 83, 311, 10859
Offset: 1
Examples
For n=5; 5= Sum_{i=1..2} pi = Sum_{j=3..3} pj. For n=83; 83= Sum_{i=5..9} pi = Sum_{j=9..11} pj.
Formula
Let pi = i-th prime, pj = j-th prime, x
A082548 a(n) is the number of values of k such that k can be expressed as the sum of distinct primes with largest prime in the sum equal to prime(n).
1, 2, 4, 7, 12, 23, 36, 53, 72, 95, 124, 155, 192, 233, 276, 323, 376, 435, 496, 563, 634, 707, 786, 869, 958, 1055, 1156, 1259, 1366, 1475, 1588, 1715, 1846, 1983, 2122, 2271, 2422, 2579, 2742, 2909, 3082, 3261, 3442, 3633, 3826, 4023, 4222, 4433, 4656, 4883
Offset: 1
Comments
Surprisingly, except for the initial term, the first differences of this sequence is the sequence of primes with 7 omitted. - John W. Layman, Feb 25 2012
Also number of k that can be expressed as a signed sum of the first n-1 primes. - Seiichi Manyama, Oct 01 2019
Examples
For n=4; 7 is the 4th prime. 7 = 7, 9 = 2+7, 10 = 3+7, 12 = 5+7 = 2+3+7, 14 = 2+5+7, 15 = 3+5+7, 17 = 2+3+5+7. Values of m are 7 and 9,10,12,14,15,17. so a(4)=7. From _Seiichi Manyama_, Oct 01 2019: (Start) 7 = 7, so 7*2 = 14 = 24-10 = 24+(-2-3-5). 2+7 = 9, so (2+7)*2 = 18 = 24- 6 = 24+( 2-3-5). 3+7 = 10, so (3+7)*2 = 20 = 24- 4 = 24+(-2+3-5). 5+7 = 12, so (5+7)*2 = 24 = 24+ 0 = 24+(-2-3+5). 2+5+7 = 14, so (2+5+7)*2 = 28 = 24+ 4 = 24+( 2-3+5). 3+5+7 = 15, so (3+5+7)*2 = 30 = 24+ 6 = 24+(-2+3+5). 2+3+5+7 = 17. so (2+3+5+7)*2 = 34 = 24+10 = 24+( 2+3+5). (End) From _Seiichi Manyama_, Oct 02 2019: (Start) Let b(n) be the number of k (>=0) that can be expressed as the sum of distinct primes with largest prime in the sum not greater than prime(n). n |b(n)| | --+----+------------+-------------------------------------- 4 | 12 | 0 | 11 | | 2 | 13 = 2+11 | | 3 | 14 = 3+11 | | 5 | 16 = 5+11 | | 7 | 18 = 7+11 | | 8 = 3+5 | 19 = 8+11 = (3+5)+11 | | 9 = 17-8 | 20 = 9+11 = (2+3+5+7)-(3+5)+11 | | 10 = 17-7 | 21 = 10+11 = (2+3+5+7)-7 +11 | | 12 = 17-5 | 23 = 12+11 = (2+3+5+7)-5 +11 | | 14 = 17-3 | 25 = 14+11 = (2+3+5+7)-3 +11 | | 15 = 17-2 | 26 = 15+11 = (2+3+5+7)-2 +11 | | 17 = 17-0 | 28 = 17+11 = (2+3+5+7) +11 --+----+------------+-------------------------------------- 5 | 23 | 0 | 13 | | 2 | 15 = 2+13 | | 3 | 16 = 3+13 | | 5 | 18 = 5+13 | | 7 | 20 = 7+13 | | 8 = 3+5 | 21 = 8+13 = (3+5) +13 | | 9 = 2+7 | 22 = 9+13 = (2+7) +13 | | 10 = 2+3+5 | 23 = 10+13 = (2+3+5)+13 | | 11 | 24 = 11+13 | | ... | ... | | 17 = 28-11 | 30 = 17+13 = (2+3+5+7+11)-11 +13 | | 18 = 28-10 | 31 = 18+13 = (2+3+5+7+11)-(2+3+5)+13 | | 19 = 28- 9 | 32 = 19+13 = (2+3+5+7+11)-(2+7) +13 | | 20 = 28- 8 | 33 = 20+13 = (2+3+5+7+11)-(3+5) +13 | | 21 = 28- 7 | 34 = 21+13 = (2+3+5+7+11)- 7 +13 | | 23 = 28- 5 | 36 = 23+13 = (2+3+5+7+11)- 5 +13 | | 25 = 28- 3 | 38 = 25+13 = (2+3+5+7+11)- 3 +13 | | 26 = 28- 2 | 39 = 26+13 = (2+3+5+7+11)- 2 +13 | | 28 = 28- 0 | 41 = 28+13 = (2+3+5+7+11) +13 --+----+------------+------------------------------------- ... b(n) = Sum_{k=1..n} prime(k) + 1 - 3*2 = A007504(n) - 5 for n>3. So a(n) = b(n-1) = A007504(n-1) - 5 for n>4. (End)
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..10000
Programs
-
PARI
limit = 70; M = sum(i = 1, limit, prime(i)); v = vector(M); primeSum = 0; forprime (n = 1, prime(limit), count = 1; forstep (i = primeSum, 1, -1, if (v[i], count = count + 1; v[i + n] = 1)); v[n] = 1; print(count); primeSum = primeSum + n)
Formula
a(n) = A007504(n-1) - 5 for n > 4. - Seiichi Manyama, Oct 02 2019
Extensions
More terms from David Wasserman, Sep 16 2004
A082547 Number of primes p such that p can be expressed as the sum of distinct primes with largest prime in the sum = n-th prime.
1, 2, 2, 2, 4, 5, 9, 11, 16, 22, 26, 30, 38, 45, 51, 59, 68, 77, 83, 96, 106, 115, 127, 139, 151, 165, 177, 190, 204, 221, 236, 250, 267, 286, 304, 323, 339, 361, 382, 400, 421, 440, 465, 486, 512, 533, 556, 580, 604, 633, 656, 686, 713, 739, 769, 797, 827, 856
Offset: 1
Examples
For n=5; 11 is the 5th prime. 11=11, 13= 2+11, 19= 3+5+11, 23= 2+3+7+11 = 5+7+11. 11 and 13,19,23 are primes. so a(5)=4.
Programs
-
PARI
limit = 70; M = sum(i = 1, limit, prime(i)); v = vector(M); primeSum = 0; forprime (n = 1, prime(limit), count = 1; forstep (i = primeSum, 1, -1, if (v[i], if (isprime(i + n), count = count + 1); v[i + n] = 1)); v[n] = 1; print(count); primeSum = primeSum + n)
Extensions
More terms from David Wasserman, Sep 16 2004
Comments