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!)
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). 5

%I #69 Dec 25 2023 22:51:41

%S 1,2,4,7,12,23,36,53,72,95,124,155,192,233,276,323,376,435,496,563,

%T 634,707,786,869,958,1055,1156,1259,1366,1475,1588,1715,1846,1983,

%U 2122,2271,2422,2579,2742,2909,3082,3261,3442,3633,3826,4023,4222,4433,4656,4883

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

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

%C Also number of k that can be expressed as a signed sum of the first n-1 primes. - _Seiichi Manyama_, Oct 01 2019

%H Seiichi Manyama, <a href="/A082548/b082548.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A007504(n-1) - 5 for n > 4. - _Seiichi Manyama_, Oct 02 2019

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

%e From _Seiichi Manyama_, Oct 01 2019: (Start)

%e 7 = 7, so 7*2 = 14 = 24-10 = 24+(-2-3-5).

%e 2+7 = 9, so (2+7)*2 = 18 = 24- 6 = 24+( 2-3-5).

%e 3+7 = 10, so (3+7)*2 = 20 = 24- 4 = 24+(-2+3-5).

%e 5+7 = 12, so (5+7)*2 = 24 = 24+ 0 = 24+(-2-3+5).

%e 2+5+7 = 14, so (2+5+7)*2 = 28 = 24+ 4 = 24+( 2-3+5).

%e 3+5+7 = 15, so (3+5+7)*2 = 30 = 24+ 6 = 24+(-2+3+5).

%e 2+3+5+7 = 17. so (2+3+5+7)*2 = 34 = 24+10 = 24+( 2+3+5). (End)

%e From _Seiichi Manyama_, Oct 02 2019: (Start)

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

%e n |b(n)| |

%e --+----+------------+--------------------------------------

%e 4 | 12 | 0 | 11

%e | | 2 | 13 = 2+11

%e | | 3 | 14 = 3+11

%e | | 5 | 16 = 5+11

%e | | 7 | 18 = 7+11

%e | | 8 = 3+5 | 19 = 8+11 = (3+5)+11

%e | | 9 = 17-8 | 20 = 9+11 = (2+3+5+7)-(3+5)+11

%e | | 10 = 17-7 | 21 = 10+11 = (2+3+5+7)-7 +11

%e | | 12 = 17-5 | 23 = 12+11 = (2+3+5+7)-5 +11

%e | | 14 = 17-3 | 25 = 14+11 = (2+3+5+7)-3 +11

%e | | 15 = 17-2 | 26 = 15+11 = (2+3+5+7)-2 +11

%e | | 17 = 17-0 | 28 = 17+11 = (2+3+5+7) +11

%e --+----+------------+--------------------------------------

%e 5 | 23 | 0 | 13

%e | | 2 | 15 = 2+13

%e | | 3 | 16 = 3+13

%e | | 5 | 18 = 5+13

%e | | 7 | 20 = 7+13

%e | | 8 = 3+5 | 21 = 8+13 = (3+5) +13

%e | | 9 = 2+7 | 22 = 9+13 = (2+7) +13

%e | | 10 = 2+3+5 | 23 = 10+13 = (2+3+5)+13

%e | | 11 | 24 = 11+13

%e | | ... | ...

%e | | 17 = 28-11 | 30 = 17+13 = (2+3+5+7+11)-11 +13

%e | | 18 = 28-10 | 31 = 18+13 = (2+3+5+7+11)-(2+3+5)+13

%e | | 19 = 28- 9 | 32 = 19+13 = (2+3+5+7+11)-(2+7) +13

%e | | 20 = 28- 8 | 33 = 20+13 = (2+3+5+7+11)-(3+5) +13

%e | | 21 = 28- 7 | 34 = 21+13 = (2+3+5+7+11)- 7 +13

%e | | 23 = 28- 5 | 36 = 23+13 = (2+3+5+7+11)- 5 +13

%e | | 25 = 28- 3 | 38 = 25+13 = (2+3+5+7+11)- 3 +13

%e | | 26 = 28- 2 | 39 = 26+13 = (2+3+5+7+11)- 2 +13

%e | | 28 = 28- 0 | 41 = 28+13 = (2+3+5+7+11) +13

%e --+----+------------+-------------------------------------

%e ...

%e b(n) = Sum_{k=1..n} prime(k) + 1 - 3*2 = A007504(n) - 5 for n>3.

%e So a(n) = b(n-1) = A007504(n-1) - 5 for n>4.

%o (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)

%Y Cf. A007504, A082533, A082534, A327467.

%K easy,nonn

%O 1,2

%A _Naohiro Nomoto_, May 02 2003

%E More terms from _David Wasserman_, Sep 16 2004

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 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)