cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A082548 #73 Aug 16 2025 03:19:17
%S A082548 1,2,4,7,12,23,36,53,72,95,124,155,192,233,276,323,376,435,496,563,
%T A082548 634,707,786,869,958,1055,1156,1259,1366,1475,1588,1715,1846,1983,
%U A082548 2122,2271,2422,2579,2742,2909,3082,3261,3442,3633,3826,4023,4222,4433,4656,4883
%N 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).
%C A082548 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 A082548 Also number of k that can be expressed as a signed sum of the first n-1 primes. - _Seiichi Manyama_, Oct 01 2019
%H A082548 Seiichi Manyama, <a href="/A082548/b082548.txt">Table of n, a(n) for n = 1..10000</a>
%F A082548 a(n) = A007504(n-1) - 5 for n > 4. - _Seiichi Manyama_, Oct 02 2019
%e A082548 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 A082548 From _Seiichi Manyama_, Oct 01 2019: (Start)
%e A082548 7       =  7, so 7*2         = 14 = 24-10 = 24+(-2-3-5).
%e A082548 2+7     =  9, so (2+7)*2     = 18 = 24- 6 = 24+( 2-3-5).
%e A082548 3+7     = 10, so (3+7)*2     = 20 = 24- 4 = 24+(-2+3-5).
%e A082548 5+7     = 12, so (5+7)*2     = 24 = 24+ 0 = 24+(-2-3+5).
%e A082548 2+5+7   = 14, so (2+5+7)*2   = 28 = 24+ 4 = 24+( 2-3+5).
%e A082548 3+5+7   = 15, so (3+5+7)*2   = 30 = 24+ 6 = 24+(-2+3+5).
%e A082548 2+3+5+7 = 17. so (2+3+5+7)*2 = 34 = 24+10 = 24+( 2+3+5). (End)
%e A082548 From _Seiichi Manyama_, Oct 02 2019: (Start)
%e A082548 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 A082548 n |b(n)|            |
%e A082548 --+----+------------+--------------------------------------
%e A082548 4 | 12 |  0         | 11
%e A082548   |    |  2         | 13 =  2+11
%e A082548   |    |  3         | 14 =  3+11
%e A082548   |    |  5         | 16 =  5+11
%e A082548   |    |  7         | 18 =  7+11
%e A082548   |    |  8 = 3+5   | 19 =  8+11 = (3+5)+11
%e A082548   |    |  9 = 17-8  | 20 =  9+11 = (2+3+5+7)-(3+5)+11
%e A082548   |    | 10 = 17-7  | 21 = 10+11 = (2+3+5+7)-7    +11
%e A082548   |    | 12 = 17-5  | 23 = 12+11 = (2+3+5+7)-5    +11
%e A082548   |    | 14 = 17-3  | 25 = 14+11 = (2+3+5+7)-3    +11
%e A082548   |    | 15 = 17-2  | 26 = 15+11 = (2+3+5+7)-2    +11
%e A082548   |    | 17 = 17-0  | 28 = 17+11 = (2+3+5+7)      +11
%e A082548 --+----+------------+--------------------------------------
%e A082548 5 | 23 |  0         | 13
%e A082548   |    |  2         | 15 =  2+13
%e A082548   |    |  3         | 16 =  3+13
%e A082548   |    |  5         | 18 =  5+13
%e A082548   |    |  7         | 20 =  7+13
%e A082548   |    |  8 = 3+5   | 21 =  8+13 = (3+5)  +13
%e A082548   |    |  9 = 2+7   | 22 =  9+13 = (2+7)  +13
%e A082548   |    | 10 = 2+3+5 | 23 = 10+13 = (2+3+5)+13
%e A082548   |    | 11         | 24 = 11+13
%e A082548   |    | ...        | ...
%e A082548   |    | 17 = 28-11 | 30 = 17+13 = (2+3+5+7+11)-11     +13
%e A082548   |    | 18 = 28-10 | 31 = 18+13 = (2+3+5+7+11)-(2+3+5)+13
%e A082548   |    | 19 = 28- 9 | 32 = 19+13 = (2+3+5+7+11)-(2+7)  +13
%e A082548   |    | 20 = 28- 8 | 33 = 20+13 = (2+3+5+7+11)-(3+5)  +13
%e A082548   |    | 21 = 28- 7 | 34 = 21+13 = (2+3+5+7+11)- 7     +13
%e A082548   |    | 23 = 28- 5 | 36 = 23+13 = (2+3+5+7+11)- 5     +13
%e A082548   |    | 25 = 28- 3 | 38 = 25+13 = (2+3+5+7+11)- 3     +13
%e A082548   |    | 26 = 28- 2 | 39 = 26+13 = (2+3+5+7+11)- 2     +13
%e A082548   |    | 28 = 28- 0 | 41 = 28+13 = (2+3+5+7+11)        +13
%e A082548 --+----+------------+-------------------------------------
%e A082548 ...
%e A082548 b(n) = Sum_{k=1..n} prime(k) + 1 - 3*2 = A007504(n) - 5 for n>3.
%e A082548 So a(n) = b(n-1) = A007504(n-1) - 5 for n>4. (End)
%o A082548 (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 A082548 Cf. A007504, A082533, A082534, A327467.
%K A082548 easy,nonn
%O A082548 1,2
%A A082548 _Naohiro Nomoto_, May 02 2003
%E A082548 More terms from _David Wasserman_, Sep 16 2004