A001212
a(n) = solution to the postage stamp problem with n denominations and 2 stamps.
Original entry on oeis.org
2, 4, 8, 12, 16, 20, 26, 32, 40, 46, 54, 64, 72, 80, 92, 104, 116, 128, 140, 152, 164, 180, 196, 212
Offset: 1
- Gardner, M. The Sixth Book of Mathematical Games from Scientific American. Chicago, IL: University of Chicago Press, p. 115 (Coins of the Realm), 1984.
- R. K. Guy, Unsolved Problems in Number Theory, C12.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- R. Alter, Letter to N. J. A. Sloane, Mar 25 1977
- R. Alter and J. A. Barnett, A postage stamp problem, Amer. Math. Monthly, 87 (1980), 206-210.
- M. F. Challis, Two new techniques for computing extremal h-bases A_k, Comp J 36(2) (1993) 117-126
- M. F. Challis and J. P. Robinson, Some Extremal Postage Stamp Bases, J. Integer Seq., 13 (2010), Article 10.2.3.
- Erich Friedman, Postage stamp problem
- R. L. Graham and N. J. A. Sloane, On Additive Bases and Harmonious Graphs, SIAM J. Algebraic and Discrete Methods, 1 (1980), 382-404.
- R. L. Graham and N. J. A. Sloane, On Additive Bases and Harmonious Graphs
- F. H. Kierstead, Jr.,, The Stamp Problem, J. Rec. Math., Vol. ?, Year ?, page 298. [Annotated and scanned copy]
- J. Kohonen, A meet-in-the-middle algorithm for finding extremal restricted additive 2-bases, arXiv preprint arXiv:1403.5945, 2014 and J. Int. Seq. 17 (2014) # 14.6.8.
- J. Kohonen, J. Corander, Addition Chains Meet Postage Stamps: Reducing the Number of Multiplications, J. Integer Seq., 17 (2014), Article 14.3.4.
- J. Kohonen, Early Pruning in the Restricted Postage Stamp Problem, arXiv preprint arXiv:1503.03416, 2015
- W. F. Lunnon, A postage stamp problem, Comput. J. 12 (1969) 377-380.
- W. F. Lunnon, A postage stamp problem [Annotated scanned copy]
- J. P. Robinson, Some postage stamp 2-bases, JIS 12 (2009) 09.1.1.
- E. S. Selmer, Letter to N. J. A. Sloane, Sep 10 1991
- Eric Weisstein's World of Mathematics, Postage stamp problem
- Mingjia Yang, An experimental walk in patterns, partitions, and words, Ph. D. Dissertation, Rutgers University (2020).
A row or column of the array
A196416 (possibly with 1 subtracted from it).
Corrected a(17). Added a(18) and a(19) from Challis. -
R. J. Mathar, Apr 01 2006
Entry improved by comments from John Seldon (johnseldon(AT)onetel.com), Sep 15 2004
a(20) from Tim Peters (tim.one(AT)comcast.net), Oct 04 2006
Added terms a(21) and a(22) from Challis and Robinson. John P Robinson (john-robinson(AT)uiowa.edu), Feb 19 2010
Added term a(23) from Challis and Robinson's July 2013 addendum, by
Jukka Kohonen, Oct 25 2013
Added a(24) from Kohonen and Corander (2013). -
N. J. A. Sloane, Jan 08 2014
A008932
Number of increasing sequences of Goldbach type of length n; a(0) = 1 by convention.
Original entry on oeis.org
1, 1, 2, 5, 17, 65, 292, 1434, 7875, 47098, 305226, 2122983, 15752080, 124015310, 1031857395, 9041908204, 83186138212, 801235247145, 8059220936672, 84463182889321
Offset: 0
Mauro Torelli (torelli(AT)hermes.mc.dsi.unimi.it)
- M. Torelli, Increasing integer sequences and Goldbach's conjecture, preprint, 1996.
-
A008932(n,pol=0)= { local(a=0, i, pol2);
!n && return(1);
i = #pol;
pol2 = pol^2;
for (i=#pol, #pol2+1,
a += A008932(n-1, pol+'x^i);
!polcoeff(pol2,i) && break;);
a } \\ Martin Fuller, Jun 01 2010
A196094
a(0) = 1; a(n) = A001212(n) + 1 for n > 0.
Original entry on oeis.org
1, 3, 5, 9, 13, 17, 21, 27, 33, 41, 47, 55, 65, 73, 81, 93, 105, 117, 129, 141, 153, 165, 181, 197, 213
Offset: 0
A193258
Sprimes: A sparse prime-like set of numbers that are constructed recursively to satisfy a Goldbach-type conjecture.
Original entry on oeis.org
1, 3, 7, 11, 13, 27, 31, 35, 49, 61, 77, 79, 93, 101, 115, 117, 133, 163, 183, 187, 193, 235, 245, 257, 271, 279, 323, 335, 343, 381, 399, 439, 481, 497, 507, 535, 549, 569, 619, 669, 681, 693, 713, 739, 815, 833, 863, 905, 941, 973, 1033, 1053, 1089, 1119
Offset: 1
a(1)=1.
Note that S1={1}, so A={1}.
Now m=min{N\A}=2.
Thus C1={3} (amongst the natural numbers only 3 can be added to 1 to give 4).
Since 3 is the only candidate, a(2)=3.
To get a(3), we repeat steps 2) to 6).
So, S2={1,3}, A={1,2,3}, m=min{N\A}=4.
Thus the candidate set is C2={5,7} (we can add 5 to 3 to get 8, or 7 to 1 to get 8).
Then w5=|({(5+1)/2, (5+3)/2} union{5}) intersect {4,5,6,7,8,9,10,...}|=|{4,5}|=2.
And w7=|({(7+1)/2, (7+3)/2} union {7}) intersect {4,5,6,7,8,9,10,11,12,13,14,...}|=|{4,5,7}|=3.
Since of the two candidates, 7 has the higher worth, then a(3)=7.
-
@cached_function
def A193258(n):
if n == 1: return 1
S = set(A193258(i) for i in [1..n-1])
A = set((i+j)/2 for i, j in cartesian_product([S, S]))
m = next(i for i in PositiveIntegers() if i not in A)
C = set(2*m-i for i in S if 2*m-i > A193258(n-1))
worthfn = lambda c: len(set((c+i)/2 for i in S).difference(A))
wc = sorted(list((worthfn(c), c) for c in C)) # sort by worth and by c
return wc[-1][1]
# D. S. McNeil, Aug 29 2011
A302648
a(n) is the largest integer b_n such that there exists a set of n integers b_1=0, b_2, ..., b_n whose pairwise sums cover all integers between 0 and 2*b_n.
Original entry on oeis.org
0, 1, 2, 4, 6, 8, 10, 13, 16, 20, 22, 27, 32, 36, 40, 46, 52, 58, 64, 70, 76, 82, 90, 98, 106, 114, 122, 131
Offset: 1
3: 0 1 2
4: 0 1 3 4
5: 0 1 3 5 6
6: 0 1 3 5 7 8
7: 0 1 2 5 8 9 10
8: 0 1 3 4 9 10 12 13
9: 0 1 2 5 8 11 14 15 16
10: 0 1 3 4 9 11 16 17 19 20
11: 0 1 3 4 6 11 13 18 19 21 22
12: 0 1 3 5 6 13 14 21 22 24 26 27
13: 0 1 3 4 9 11 16 21 23 28 29 31 32
14: 0 1 3 4 9 11 16 20 25 27 32 33 35 36
15: 0 1 3 4 5 8 14 20 26 32 35 36 37 39 40
16: 0 1 3 4 5 8 14 20 26 32 38 41 42 43 45 46
17: 0 1 3 4 5 8 14 20 26 32 38 44 47 48 49 51 52
18: 0 1 3 4 5 8 14 20 26 32 38 44 50 53 54 55 57 58
19: 0 1 3 4 5 8 14 20 26 32 38 44 50 56 59 60 61 63 64
20: 0 1 3 4 5 8 14 20 26 32 38 44 50 56 62 65 66 67 69 70
21: 0 1 3 4 5 8 14 20 26 32 38 44 50 56 62 68 71 72 73 75 76
22: 0 1 3 4 6 10 13 15 21 29 37 45 53 61 67 69 72 76 78 79 81 82
23: 0 1 3 4 6 10 13 15 21 29 37 45 53 61 69 75 77 80 84 86 87 89 90
24: 0 1 3 4 6 10 13 15 21 29 37 45 53 61 69 77 83 85 88 92 94 95 97 98
25: 0 1 3 4 6 10 13 15 21 29 37 45 53 61 69 77 85 91 93 96 100 102 103 105 106
26: 0 1 3 4 6 10 13 15 21 29 37 45 53 61 69 77 85 93 99 101 104 108 110 111 113 114
-
/* C code to generate first part of the sets --
change K to larger value to generate more sets */
#include
#include
#include
#ifndef K
#define K 8
#endif
#ifndef R
#define R 1
#endif
#define UPBOUND 40960
unsigned short data[K+R];
unsigned short sumbuf[UPBOUND];
unsigned short diffbuf[UPBOUND];
unsigned short modbuf[K];
int rcount;
int level;
int next_sum,next_diff;
int cur_best=10000000;
void output()
{
int i,j;
int b=data[level-1]+K;
int tindex=1;
for(i=b;i=data[j]&&(h-data[j])%K==0){
min_index=(h-data[j])/K;
}
}
if(min_index<0)return;
if(min_index>tindex)tindex=min_index;
}
}
for(i=0;itindex)tindex=min_index;
}
}
if(K*(level-1)-data[level-1]<=cur_best){
cur_best=K*(level-1)-data[level-1];
printf("%d,>=%d | ",K*(level-1)-data[level-1],tindex);
for(i=0;i0){
if(rcount>=R)return 0;
rcount++;
}
modbuf[r]++;
for(i=0;i0){
rcount--;
}
sumbuf[x+x]--;diffbuf[0]--;
for(i=0;i=K&&data[level-1]+K<=next_sum){
output();
}
for(i=startv;i<=next_sum&&i<=K-1+data[level-1];++i){
if(push(i)){
search(i+1);
pop();
}
}
}
int main()
{
data[0]=0;data[1]=1;
sumbuf[0]=sumbuf[1]=sumbuf[2]=1;rcount=0;
diffbuf[0]=2;diffbuf[1]=1;next_diff=2;
next_sum = 3;
level=2;
search( 2);
}
Showing 1-5 of 5 results.
Comments