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.
%I A103152 #15 Mar 17 2020 20:51:14 %S A103152 9,13,17,29,45,51,69,81,99,93,105,135,153,201,195,165,231,237,321,297, %T A103152 225,363,725,393,285,315,471,483,435,405,465,561,555,495,609,783,675, %U A103152 867,849,963,645,525,693,897,795,915,987,735,855,825,765,1095,975,1467 %N A103152 Smallest odd number which can be written as a sum 2p+q (where p and q are both odd primes, A065091) in exactly n ways, zero if there are no such odd number. %C A103152 Conjecture: except for the 2nd, 3rd and 4th terms, all other terms are divisible by 3; See also comments in A103151. %C A103152 a(23)=725 is also not divisible by 3. [_D. S. McNeil_, Sep 06 2010] %C A103152 The only terms a(n) not divisible by 3 for n <= 1450 are a(2),a(3),a(4) and a(23). - _Robert Israel_, Mar 17 2020 %H A103152 Robert Israel, <a href="/A103152/b103152.txt">Table of n, a(n) for n = 1..1450</a> %e A103152 9 is the smallest odd number with just one such composition: 9 = 3+2*3, thus a(1)=9. %e A103152 Similarly, 13 is smallest with exactly 2 compositions: 13 = 3+2*5 = 7+2*3, thus a(2)=13. %p A103152 N:= 2000: # for terms before the first term > N %p A103152 P:= select(isprime, [seq(i,i=3..N,2)]): %p A103152 nP:= nops(P): %p A103152 V:= Vector(N): %p A103152 for i from 1 while 2*P[i]<N do %p A103152 for j from 1 to nP do %p A103152 k:= 2*P[i]+P[j]; %p A103152 if k > N then break fi; %p A103152 V[k]:= V[k]+1; %p A103152 od od: %p A103152 A:= Vector(N): %p A103152 for i from 1 to N by 2 do if V[i] <> 0 and A[V[i]] = 0 then A[V[i]]:= i fi od: %p A103152 for i from 1 to N do if A[i] = 0 then break fi od: %p A103152 seq(A[j],j=1..i-1); # _Robert Israel_, Mar 17 2020 %t A103152 Array[a, 300]; Do[a[n] = 0, {n, 1, 300}]; n = 9; ct = 0; While[ct < 200, m = 3; ct = 0; While[(m*2) < n, If[PrimeQ[m], cp = n - (2* m); If[PrimeQ[cp], ct = ct + 1]]; m = m + 2]; If[a[ct] == 0, a[ct] = n]; n = n + 2]; Print[a] %o A103152 (Scheme) (define (A103152 n) (+ 1 (* 2 (first-n-where-fun_n-is-i1 A103151 n)))) %o A103152 (define (first-n-where-fun_n-is-i1 fun i) (let loop ((n 1)) (cond ((= i (fun n)) n) (else (loop (+ n 1)))))) ;; _Antti Karttunen_, Jun 19 2007 %Y A103152 Cf. A103151, A001172, A001031. %K A103152 nonn %O A103152 1,1 %A A103152 _Lei Zhou_, Feb 09 2005 %E A103152 Starting offset changed from 0 to 1 by _Antti Karttunen_, Jun 19 2007