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.

Showing 1-10 of 17 results. Next

A002858 Ulam numbers: a(1) = 1; a(2) = 2; for n>2, a(n) = least number > a(n-1) which is a unique sum of two distinct earlier terms.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 26, 28, 36, 38, 47, 48, 53, 57, 62, 69, 72, 77, 82, 87, 97, 99, 102, 106, 114, 126, 131, 138, 145, 148, 155, 175, 177, 180, 182, 189, 197, 206, 209, 219, 221, 236, 238, 241, 243, 253, 258, 260, 273, 282, 309, 316, 319, 324, 339
Offset: 1

Views

Author

Keywords

Comments

Ulam conjectured that this sequence has density 0. However, calculations up to 6.759*10^8 (Jud McCranie) indicate that the density hovers near 0.074.
A plot of the first 3 million terms shows that they lie very close to the straight line 13.51*n, so even if we cannot prove it, we believe we now know how this sequence grows (see the plots in the links below). - N. J. A. Sloane, Sep 27 2006
After a few initial terms, the sequence settles into a regular pattern of dense clumps separated by sparse gaps, with period 21.601584+. This pattern continues up to at least a(n) = 5*10^6. (This comment is just a qualitative statement about the wavelike distribution of Ulam numbers, not meant to imply that every period includes Ulam numbers.) - David W. Wilson
_Don Knuth_ (Sep 26 2006) remarks that a(4952)=64420 and a(4953)=64682 (a gap of more than ten "dense clumps"); and there is a gap of 315 between a(18857) and a(18858).
1,2,3,47 are the only values of x < 6.759*10^8 such that x and x+1 are both Ulam numbers. - Jud McCranie, Jun 08 2001. This holds through the first 28 billion Ulam numbers - Jud McCranie, Jan 07 2016.
From Jud McCranie on David W. Wilson's illustration, Jun 20 2008: (Start)
The integers are shown from left to right, top to bottom, with a dot where there is an Ulam number. I think his plot is 216 wide. The local density of Ulam numbers goes in waves with a period of 21.6+, so his plot shows ten cycles.
When they are arranged that way you can see the waves. The crests of the density waves don't always have Ulam numbers there but the troughs are practically void of Ulam numbers. I noticed that the ratio of that period (21.6+) to the frequency of Ulam numbers (1 in 13.52) is very close to 8/5. (End)
a(50000000) = 675904508. - Jud McCranie, Feb 29 2012
a(100000000) = 1351856726. - Jud McCranie, Jul 31 2012
a(1000000000) = 13517664323. - Jud McCranie, Aug 28 2015
a(28000000000) = 378485625853 - Philip Gibbs & Jud McCranie, Sep 09 2015
3 (=1+2) and 131 (=62+69) are the only two Ulam numbers in the first 28 billion Ulam numbers that are the sum of two consecutive Ulam numbers. - Jud McCranie, Jan 09 2016
Named after the Polish-American scientist Stanislaw Ulam (1909-1984). - Amiram Eldar, Jun 08 2021

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 2.16.2.
  • Richard K. Guy, Unsolved Problems in Number Theory, C4.
  • Donald E. Knuth, The Art of Computer Programming, Volume 4A, Section 7.1.3.
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 116.
  • Marvin C. Wunderlich, The improbable behavior of Ulam's summation sequence, pp. 249-257 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • David Zeitlin, Ulam's sequence {U_n}, U_1=1, U_2=2, is a complete sequence, Notices Amer. Math. Soc., 22 (No. 7, 1975), Abstract 75T-A267, p. A-707.

Crossrefs

Cf. A002859 (version beginning 1,3), A054540, A003667, A001857, A007300, A117140, A214603.
First differences: A072832, A072540.
Cf. A080287, A080288, A004280 (if distinct removed from definition).
See also the density plots in A080573 and A285884.

Programs

  • Haskell
    a002858 n = a002858_list !! (n-1)
    a002858_list = 1 : 2 : ulam 2 2 a002858_list
    ulam :: Int -> Integer -> [Integer] -> [Integer]
    ulam n u us = u' : ulam (n + 1) u' us where
       u' = f 0 (u+1) us'
       f 2 z _                         = f 0 (z + 1) us'
       f e z (v:vs) | z - v <= v       = if e == 1 then z else f 0 (z + 1) us'
                    | z - v `elem` us' = f (e + 1) z vs
                    | otherwise        = f e z vs
       us' = take n us
    -- Reinhard Zumkeller, Nov 03 2011
    
  • Julia
    function isUlam(u, n, h, i, r)
        h == 2 && return false
        ur = u[r]; ui = u[i]
        ur <= ui && return h == 1
        if ur + ui > n
            r -= 1
        elseif ur + ui < n
            i += 1
        else
            h += 1; i += 1; r -= 1
        end
        isUlam(u, n, h, i, r)
    end
    function UlamList(len)
        u = Array{Int, 1}(undef, len)
        u[1] = 1; u[2] = 2; i = 2; n = 2
        while i < len
            n += 1
            if isUlam(u, n, 0, 1, i)
                i += 1
                u[i] = n
            end
        end
        return u
    end
    println(UlamList(59)) # Peter Luschny, Apr 07 2019
    
  • Maple
    UlamList := proc(len) local isUlam, nextUlam, behead; behead := u -> u[2..numelems(u)]; isUlam := proc(n, h, u, r) local hu, tu, hr, tr; hu := u[1]; hr := r[1]; if h = 2 then return false fi; if hr <= hu then return evalb(h = 1) fi; if (hr + hu) = n then tu := behead(u); tr := behead(r); return isUlam(n, h+1, tu, tr) fi; if (hr + hu) < n then tu := behead(u): return isUlam(n, h, tu, r) fi; tr := behead(r); isUlam(n, h, u, tr) end: nextUlam := proc(n, u, r) if isUlam(n, 0, u, r) then if nops(u) = len-1 then return [op(u), n] fi; nextUlam(n+1, [op(u), n], [n, op(r)]) else nextUlam(n+1, u, r) fi end: nextUlam(3, [1, 2], [2, 1]) end:
    UlamList(59); # Peter Luschny, Apr 05 2019
  • Mathematica
    Ulam4Compiled = Compile[{{nmax, _Integer}, {init, _Integer, 1}, {s, _Integer}}, Module[{ulamhash = Table[0, {nmax}], ulam = init}, ulamhash[[ulam]] = 1; Do[ If[Quotient[Plus @@ ulamhash[[i - ulam]], 2] == s, AppendTo[ulam, i]; ulamhash[[i]] = 1], {i, Last[init] + 1, nmax}]; ulam]]; ulams = Ulam4Compiled[355, {1, 2}, 1]
    (* Second program: *)
    ulams = {1, 2}; Do[AppendTo[ulams, n = Last[ulams]; While[n++; Length[DeleteCases[Intersection[ulams, n - ulams], n/2, 1, 1]] != 2]; n], {100}]; ulams (* Jean-François Alcover, Sep 08 2011 *)
    findUlams[s_List, j_Integer] := Block[{k = s[[-1]] + 1, ss = Plus @@@ Subsets[s, {j}]}, While[ Count[ss, k] != 1, k++]; Append[s, k]]; ulams = Nest[findUlams[#, 2] &, {1, 2}, 70] (* Robert G. Wilson v, Jul 05 2014 *)
  • PARI
    aupto(N)= my(seen=vector(N), U=[]); seen[1]=seen[2]=1; for(i=1,N, if(1==seen[i], for(j=1,#U, my(sum=i+U[j]); if(sum>N, break); seen[sum]++); U=concat(U,i))); U \\ Ruud H.G. van Tol, Dec 29 2022
  • Python
    def isUlam(n, h, u, r):
        if h == 2: return False
        hu = u[0]; hr = r[0]
        if hr <= hu: return h == 1
        if hr + hu > n: r = r[1:]
        elif hr + hu < n: u = u[1:]
        else: h += 1; r = r[1:]; u = u[1:]
        return isUlam(n, h, u, r)
    def UlamList(length):
        u = [1, 2]; r = [2, 1]; n = 2
        while len(u) < length:
            n += 1
            if isUlam(n, 0, u[:], r[:]):
                u.append(n); r.insert(0, n)
        return u
    print(UlamList(59)) # Peter Luschny, Apr 06 2019
    

Extensions

More terms from Jud McCranie

A003665 a(n) = 2^(n-1)*( 2^n + (-1)^n ).

Original entry on oeis.org

1, 1, 10, 28, 136, 496, 2080, 8128, 32896, 130816, 524800, 2096128, 8390656, 33550336, 134225920, 536854528, 2147516416, 8589869056, 34359869440, 137438691328, 549756338176, 2199022206976, 8796095119360, 35184367894528, 140737496743936, 562949936644096, 2251799847239680
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of expansion of cosh(3*x), the aerated version of A001019, 1,0,9,0,81,0,729,... - Paul Barry, Apr 05 2003
Alternatively: start with the fraction 1/1, take the numerators of fractions built according to the rule: add top and bottom to get the new bottom, add top and 9 times the bottom to get the new top. The limit of the sequence of fractions used to generate this sequence is sqrt(9). - Cino Hilliard, Sep 25 2005
This sequence also gives the number of ordered pairs of subsets (A, B) of {1, 2, ..., n} such that |A u B| is even. (Here "u" stands for the set-theoretic union.) The special case n = 13 can be found as in CRUX Problem 3257. - Walther Janous (walther.janous(AT)tirol.com), Mar 01 2008
For n > 0, a(n) is term (1,1) in the n-th power of the 2 X 2 matrix [1,3; 3,1]. - Gary W. Adamson, Aug 06 2010
a(n) is the number of compositions of n when there are 1 type of 1 and 9 types of other natural numbers. - Milan Janjic, Aug 13 2010
a(n) = ((1+3)^n+(1-3)^n)/2. In general, if b(0),b(1),... is the k-th binomial transform of the sequence ((3^n+(-3)^n)/2), then b(n) = ((k+3)^n+(k-3)^n)/2. More generally, if b(0),b(1),... is the k-th binomial transform of the sequence ((m^n+(-m)^n)/2), then b(n) = ((k+m)^n+(k-m)^n)/2. See A034494, A081340-A081342, A034659. - Charlie Marion, Jun 25 2011
Pisano period lengths: 1, 1, 1, 1, 4, 1, 6, 1, 1, 4, 5, 1, 12, 6, 4, 1, 8, 1, 9, 4, ... - R. J. Mathar, Aug 10 2012
Starting with offset 1 the sequence is the INVERT transform of (1, 9, 9, 9, ...). - Gary W. Adamson, Aug 06 2016

References

  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, p. 16.
  • M. Gardner, Riddles of Sphinx, M.A.A., 1987, p. 145.

Crossrefs

Programs

  • GAP
    List([0..30], n-> 2^(n-1)*(2^n +(-1)^n)); # G. C. Greubel, Aug 02 2019
  • Magma
    [2^(n-1)*( 2^n + (-1)^n ): n in [0..30]]; // Vincenzo Librandi, Aug 19 2011
    
  • Maple
    A003665:=n->2^(n-1)*( 2^n + (-1)^n ): seq(A003665(n), n=0..30); # Wesley Ivan Hurt, Apr 28 2017
  • Mathematica
    CoefficientList[Series[(1+8x)/(1-2x-8x^2), {x,0,30}], x] (* or *)
    LinearRecurrence[{2,8}, {1,1}, 30] (* Robert G. Wilson v, Sep 18 2013 *)
  • PARI
    a(n)=2^(n-1)*( 2^n + (-1)^n );
    
  • Sage
    [2^(n-1)*(2^n +(-1)^n) for n in (0..30)] # G. C. Greubel, Aug 02 2019
    

Formula

From Paul Barry, Mar 01 2003: (Start)
a(n) = 2*a(n-1) + 8*a(n-2), a(0)=a(1)=1.
a(n) = (4^n + (-2)^n)/2.
G.f.: (1-x)/((1+2*x)*(1-4*x)). (End)
From Paul Barry, Apr 05 2003: (Start)
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2*k)*9^k.
E.g.f. exp(x)*cosh(3*x). (End)
a(n) = (A078008(n) + A001045(n+1))*2^(n-1) = A014551(n)*2^(n-1). - Paul Barry, Feb 12 2004
Given a(0)=1, b(0)=1 then for i=1, 2, ..., a(i)/b(i) = (a(i-1) + 9*b(i-1)) / (a(i-1) + b(i-1)). - Cino Hilliard, Sep 25 2005
a(n) = Sum_{k=0..n} A098158(n,k)*9^(n-k). - Philippe Deléham, Dec 26 2007
a(n) = ((1+sqrt(9))^n + (1-sqrt(9))^n)/2. - Al Hakanson (hawkuu(AT)gmail.com), Dec 08 2008
If p[1]=1, and p[i]=9, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det(A). - Milan Janjic, Apr 29 2010
G.f.: G(0)/2, where G(k) = 1 + 1/(1 - x*(9*k-1)/(x*(9*k+8) - 1/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, May 28 2013

Extensions

Entry revised by N. J. A. Sloane, Nov 22 2006

A135737 Ulam type (1-additive) sequences u[1]=2, u[2]=2n+1, u[k+1] is least unique sum u[i]+u[j]>u[k], 1<=i

Original entry on oeis.org

2, 3, 2, 5, 5, 2, 7, 7, 7, 2, 8, 9, 9, 9, 2, 9, 11, 11, 11, 11, 2, 13, 12, 13, 13, 13, 13, 2, 14, 13, 15, 15, 15, 15, 15, 2, 18, 15, 16, 17, 17, 17, 17, 17, 2, 19, 19, 17, 19, 19, 19, 19, 19, 19, 2, 24, 23, 19, 20, 21, 21, 21, 21, 21, 21, 2, 25, 27, 21, 21, 23, 23, 23, 23, 23, 23, 23
Offset: 1

Views

Author

M. F. Hasler, Nov 26 2007

Keywords

Comments

Any of the sequences u=U(2,2n+1) has u[1]=2 and u[n+4]=4n+4; in between these there are the odd numbers 2n+1,...,4n-3. For n>1 there are no other even terms and the sequence of first differences becomes periodic for k>=t (transient phase), such that u[k] = u[k-floor((k-t)/p)*p] + floor((k-t)/p)*d, where p is the period (cf. A100729) and d the fundamental difference (cf. A100730). See the cross-references, especially A002858, for more information.

Examples

			The sequence contains the terms of the table T[n,k] = U(2,2n+1)[k], read by antidiagonals: a[1]=T[1,1]=2, a[2]=T[1,2]=3, a[3]=T[2,1]=2, a[4]=T[1,3]=5,...
n=1: U(2,3)= 2, 3, 5, 7, 8, 9,13,14...
n=2: U(2,5)= 2, 5, 7, 9,11,12,...
n=3: U(2,7)= 2, 7, 9,11,13,...
n=4: U(2,9)= 2, 9,11,...
		

Crossrefs

Cf. A001857 = U(2, 3) = row 1, A007300 = U(2, 5) = row 2, A003668 = U(2, 7) = row 3; A100729-A100730 (period).
Cf. A002858 = U(1, 2): this would be row 0, with u[1], u[2] exchanged.
See also: A002859 = U(1, 3), A003666 = U(1, 4), A003667 = U(1, 5).

Programs

  • PARI
    ulam(a,b,Nmax=30,i)=a=[a,b]; b=[a[1]+b]; for( k=3,Nmax, i=1; while(( i<#b && b[i]==b[i+1] && i+=2 ) || ( i>1 && b[i]==b[i-1] && i++),); a=concat(a,b[i]); b=vecsort(concat(vecextract(b,Str("^..",i)),vector(k-1,j,a[k]+a[j]))); i=0; for(j=1,#b-2, if( b[j]==b[j+2], i+=1<A135737(Nmax=100)=local(T=vector(sqrtint(Nmax*2)+1,n, ulam(2,2*n+1, sqrtint(Nmax*2)+2-n)),i,j); vector(Nmax,k,if(j>1,T[i++ ][j-- ],j=i+1;T[i=1][j]))

A183527 An Ulam-type sequence: a(n) = n if n<=4; for n>4, a(n) = least number > a(n-1) which is a unique sum of 4 distinct earlier terms.

Original entry on oeis.org

1, 2, 3, 4, 10, 16, 17, 18, 19, 22, 64, 65, 66, 68, 69, 128, 132, 188, 190, 191, 194, 252, 253, 255, 313, 314, 318, 374, 376, 377, 436, 441, 496, 497, 499, 500, 502, 560, 561, 563, 621, 622, 626, 682, 684, 685, 687, 745, 746, 805, 811
Offset: 1

Views

Author

Keywords

Comments

An Ulam-type sequence - see A002858 for further information.

Examples

			a(5) = 10 = 1 + 2 + 3 + 4 = 4*5/2, because it is the least number >4 with a unique sum of 4 distinct earlier terms.
a(6) = 16 = 1 + 2 + 3 + 10 = 4^2, because it is the least number >10 with a unique sum of 4 distinct earlier terms.
		

Crossrefs

Programs

  • Maple
    # see A183534 for programs.

Formula

Conjectured G.f.: (-61*x^124-56*x^118+53*x^117+3*x^116 -x^115+2*x^114-65*x^113-58*x^112+57*x^111 -56*x^110-x^109-57*x^108+54*x^106 +3*x^105+58*x^104-52*x^102+50*x^101-55*x^100 +56*x^95-53*x^94-3*x^93+x^92-2*x^91 +2*x^90+x^87-x^86 +41*x^84-51*x^83-66*x^82-58*x^81 -52*x^79+4*x^78-58*x^77 -x^74-x^73-x^72-54*x^71 -6*x^70-59*x^69-x^68-58*x^67-2*x^66 -x^65-2*x^64-56*x^63-4*x^62-x^61 -58*x^60-2*x^59-59*x^58-x^57-x^56 -2*x^55-x^54-x^53-54*x^52-6*x^51 -59*x^50-x^49-58*x^48-2*x^47-x^46 -2*x^45-56*x^44-4*x^43-x^42-58*x^41 -2*x^40-x^39-58*x^38-2*x^37-x^36 -2*x^35-x^34-55*x^33-5*x^32-59*x^31 -x^30-2*x^29-56*x^28-4*x^27-x^26 -58*x^25-2*x^24-x^23-58*x^22-3*x^21 -x^20-2*x^19-56*x^18-4*x^17-59*x^16 -x^15-2*x^14-x^13-x^12-42*x^11 -3*x^10-x^9-x^8-x^7-6*x^6 -6*x^5-x^4-x^3-x^2-x) / (-x^74+x^73+x-1). (This has been verified for n up to 1000.)

A003666 a(n) is smallest number which is uniquely of the form a(j) + a(k) with 1 <= j < k < n and a(1) = 1, a(2) = 4.

Original entry on oeis.org

1, 4, 5, 6, 7, 8, 10, 16, 18, 19, 21, 31, 32, 33, 42, 46, 56, 57, 66, 70, 79, 82, 91, 96, 104, 105, 107, 116, 129, 130, 131, 141, 158, 165, 168, 179, 180, 182, 191, 204, 205, 206, 216, 217, 218, 219, 229, 230, 244, 256, 266, 267, 268, 281, 290, 315, 316, 317, 318, 328
Offset: 1

Views

Author

Keywords

Comments

An Ulam-type sequence - see A002858 for many further references, comments, etc. - T. D. Noe, Jan 21 2008

References

  • R. K. Guy, "s-Additive sequences", preprint, 1994.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a003666 n = a003666_list !! (n-1)
    a003666_list = 1 : 4 : ulam 2 4 a003666_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011
  • Mathematica
    Nest[Append[#, SelectFirst[Union@ Select[Tally@ Map[Total, Select[Permutations[#, {2}], #1 < #2 & @@ # &]], Last@ # == 1 &][[All, 1]], Function[k, FreeQ[#, k]]]] &, {1, 4}, 58] (* Michael De Vlieger, Nov 16 2017 *)

A003662 a(n) is smallest number != a(j) + a(k), j < k and a(1) = 1, a(2) = 4.

Original entry on oeis.org

1, 4, 6, 8, 11, 13, 16, 18, 23, 25, 28, 30, 35, 37, 40, 42, 47, 49, 52, 54, 59, 61, 64, 66, 71, 73, 76, 78, 83, 85, 88, 90, 95, 97, 100, 102, 107, 109, 112, 114, 119, 121, 124, 126, 131, 133, 136, 138, 143, 145, 148, 150, 155, 157, 160, 162, 167, 169, 172, 174, 179, 181, 184
Offset: 1

Views

Author

Keywords

References

  • R. K. Guy, "s-Additive sequences", preprint, 1994.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A060469.
Cf. A003666.

Programs

  • Mathematica
    Sort[Join[{8},Select[Range[200],MemberQ[{1,4,6,11},Mod[#,12]]&]]] (* Harvey P. Dale, Apr 26 2011 *)
  • PARI
    Vec(x*(2*x^8+x^6-x^5+2*x^4+2*x^3+2*x^2+3*x+1)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Feb 27 2015

Formula

Numbers congruent to {1, 4, 6, 11} mod 12 plus the number 8.
a(n) = a(n-1) + a(n-4) - a(n-5) for n > 7. - Colin Barker, Feb 27 2015
G.f.: x*(2*x^8 + x^6 - x^5 + 2*x^4 + 2*x^3 + 2*x^2 + 3*x + 1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Feb 27 2015

Extensions

Name clarified by David A. Corneth, Mar 13 2023

A100729 Period of the first difference of Ulam 1-additive sequence U(2,2n+1).

Original entry on oeis.org

32, 26, 444, 1628, 5906, 80, 126960, 380882, 2097152, 1047588, 148814, 8951040, 5406720, 242, 127842440, 11419626400, 12885001946, 160159528116, 687195466408, 6390911336402, 11728121233408, 20104735604736
Offset: 2

Views

Author

Ralf Stephan, Dec 03 2004

Keywords

Comments

It was proved by Akeran that a(2^k-1) = 3^(k+1) - 1.
Note that a(n)=2^(2n+1) as soon as A100730(n)=2^(2n+3)-2, that happens for n=(m-2)/2 with m>=6 being an even element of A073639.

Examples

			For k=2, we have a(3)=3^3-1=26.
		

Crossrefs

Cf. A100730 for the fundamental difference, A001857 for U(2, 3), A007300 for U(2, 5), A003668 for U(2, 7).
Cf. also A006844.

Extensions

a(3) corrected from 25 to 26 by Hugo van der Sanden and Bertram Felgenhauer (int-e(AT)gmx.de), Nov 11 2007
More terms from Balakrishnan V (balaji.iitm1(AT)gmail.com), Nov 15 2007
a(21..31) and b-file from Max Alekseyev, Dec 01 2007

A003663 a(n) is smallest number != a(j) + a(k), j < k and a(1) = 1, a(2) = 6.

Original entry on oeis.org

1, 6, 8, 10, 12, 15, 17, 19, 24, 26, 28, 33, 35, 37, 42, 44, 46, 51, 53, 55, 60, 62, 64, 69, 71, 73, 78, 80, 82, 87, 89, 91, 96, 98, 100, 105, 107, 109, 114, 116, 118, 123, 125, 127, 132, 134, 136, 141, 143, 145, 150, 152, 154, 159, 161, 163, 168, 170, 172, 177, 179
Offset: 1

Views

Author

Keywords

Comments

Numbers congruent to {1, 6, 8} mod 9 plus the number 12.

References

  • R. K. Guy, "s-Additive sequences", preprint, 1994.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Magma
    I:=[1,6,8,10,12,15,17,19,24]; [n le 9 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Feb 22 2018
  • Mathematica
    f[s_List, j_Integer] := Block[{k = s[[-1]] + 1, ss = Union[Plus @@@ Subsets[s, {j}]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#, 2] &, {1, 6}, 65] (* Robert G. Wilson v, Jul 05 2014 *)
    LinearRecurrence[{1,0,1,-1},{1,6,8,10,12,15,17,19,24},70] (* Harvey P. Dale, Jul 25 2018 *)

Formula

From Chai Wah Wu, Feb 21 2018: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 9.
G.f.: x*(2*x^8 + x^5 - 3*x^4 + x^3 + 2*x^2 + 5*x + 1)/(x^4 - x^3 - x + 1). (End)

Extensions

Name clarified by David A. Corneth, Mar 13 2023

A003667 a(n) is smallest number which is uniquely of the form a(j) + a(k) with 1 <= j < k < n and a(1) = 1, a(2) = 5.

Original entry on oeis.org

1, 5, 6, 7, 8, 9, 10, 12, 20, 22, 23, 24, 26, 38, 39, 40, 41, 52, 57, 69, 70, 71, 82, 87, 98, 102, 113, 119, 129, 130, 133, 144, 160, 161, 162, 163, 175, 196, 205, 208, 209, 222, 223, 224, 226, 237, 253, 254, 255, 256, 268, 269, 270, 271, 272, 284, 285, 286, 303, 318
Offset: 1

Views

Author

Keywords

Comments

An Ulam-type sequence - see A002858 for many further references, comments, etc.

References

  • R. K. Guy, "s-Additive sequences", preprint, 1994.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Programs

  • Haskell
    a003667 n = a003667_list !! (n-1)
    a003667_list = 1 : 5 : ulam 2 5 a003667_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011
  • Mathematica
    Nest[Append[#, SelectFirst[Union@ Select[Tally@ Map[Total, Select[Permutations[#, {2}], #1 < #2 & @@ # &]], Last@ # == 1 &][[All, 1]], Function[k, FreeQ[#, k]]]] &, {1, 5}, 58] (* Michael De Vlieger, Nov 16 2017 *)

Extensions

Name clarfied by David A. Corneth, Mar 13 2023

A100730 Fundamental difference of Ulam 1-additive sequence starting U(2,2n+1).

Original entry on oeis.org

126, 126, 1778, 6510, 23622, 510, 507842, 1523526, 8388606, 4194302, 597870, 35791394, 21691754, 2046, 511305630, 45678505642, 51539607546, 640638112422, 2748779069430, 25563645345606, 46912496118442, 80418967640942
Offset: 2

Views

Author

Ralf Stephan, Dec 03 2004

Keywords

Crossrefs

Cf. A100729 for the period, A001857 for U(2, 3), A007300 for U(2, 5), A003668 for U(2, 7).

Formula

a(n) = 2 * A046932(2*n+2)

Extensions

2 more terms from Balakrishnan V (balaji.iitm1(AT)gmail.com), Nov 15 2007
Further new terms and b-file from Max Alekseyev, Dec 01 2007
b-file extended by Max Alekseyev, Aug 17 2015
Showing 1-10 of 17 results. Next