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-4 of 4 results.

A060470 Smallest positive a(n) such that number of solutions to a(n)=a(j)+a(k) j

Original entry on oeis.org

1, 2, 3, 4, 5, 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
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2001

Keywords

Comments

Numbers {1,6,8} mod 9 plus {2,3,4,5,12}.

Examples

			12 is in the sequence since it is 4+8 and 2+10 but no other sum of two distinct terms.
		

Crossrefs

Cf. A003044, A033627, A060469, A060471, A060472. Virtually identical to A003663.

Programs

  • Magma
    I:=[1,2,3,4,5,6,8,10,12,15,17,19,24]; [n le 13 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, Feb 22 2018
    
  • Magma
    [n le 9 select Floor(n^2/12+n/2+3/4) else 2*n+3*Floor(n/3+2/3)-17: n in [1..65]]; // Bruno Berselli, Feb 22 2018
  • Mathematica
    f[s_List, j_Integer] := Block[{cnt, k = s[[-1]] + 1, ss = Plus @@@ Subsets[s, {j}]}, While[ cnt = Count[ss, k]; cnt == 0 || cnt > 2, k++]; Append[s, k]]; Nest[f[#, 2] &, {1, 2}, 70] (* Robert G. Wilson v, Jul 05 2014 *)
    CoefficientList[Series[(2 x^12 + x^9 + x^8 + x^7 + x^6 + x^2 + x + 1) / (x^4 - x^3 - x + 1), {x, 0, 100}], x] (* Vincenzo Librandi, Feb 22 2018 *)

Formula

From Chai Wah Wu, Feb 21 2018: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n > 13.
G.f.: x*(2*x^12 + x^9 + x^8 + x^7 + x^6 + x^2 + x + 1)/(x^4 - x^3 - x + 1). (End)
a(n) = 2*n + 3*floor(n/3 + 2/3) - 17 for n>9. - Bruno Berselli, Feb 22 2018

A199162 a(1) = 1, a(2) = 6; 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, 6, 7, 8, 9, 10, 11, 12, 14, 24, 26, 27, 28, 29, 31, 45, 46, 47, 48, 49, 62, 68, 82, 83, 84, 85, 98, 104, 117, 122, 135, 142, 154, 155, 159, 172, 191, 192, 193, 194, 195, 209, 234, 245, 248, 249, 250, 265, 266, 267, 268, 270, 283, 302, 303, 304, 305, 306
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 03 2011

Keywords

Comments

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

Examples

			13 is not a term, as 13 = 7+6 = a(3)+a(2) and 13 = 12+1 = a(8)+a(1);
14 is a term, because 14 = 8 + 6 = a(4) + a(2) is unique for distinct terms, a(9) = 14.
		

Crossrefs

Cf. A003663.

Programs

  • Haskell
    a199162 n = a199162_list !! (n-1)
    a199162_list = 1 : 6 : ulam 2 6 a199162_list
    -- Function ulam as defined in A002858.
    -- Reinhard Zumkeller, Nov 03 2011

A244750 0-additive sequence: a(n) is the smallest number larger than a(n-1) which is not the sum of any subset of earlier terms, with initial values {0, 2, 3, 4}.

Original entry on oeis.org

0, 2, 3, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144
Offset: 1

Views

Author

Keywords

Examples

			a(5) cannot be 5=2+3. It cannot be 6=2+4. It cannot be 7=3+4, and becomes a(5)=8.
a(6) cannot be 9=2+3+4. It cannot be 10=2+8. It cannot be 11=3+8. It cannot be 12 = 4+8. It cannot be 13=2+3+8. It cannot be 14=2+4+8. It cannot be 15=3+4+8, and becomes a(6)=16.
		

References

  • R. K. Guy, "s-Additive sequences," preprint, 1994.

Crossrefs

Programs

  • Maple
    A244750:= proc(n)
        option remember;
        if n <= 4 then
            op(n,[0,2,3,4]);
        else
            prev := {seq(procname(k),k=1..n-1)} ;
            for a from procname(n-1)+1 do
                awrks := true ;
                for asub in combinat[choose](prev) do
                    if add(p,p=asub) = a then
                        awrks := false;
                        break;
                    end if;
                end do:
                if awrks then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    for n from 1 do
        print(A244750(n)) ;
    end do: # R. J. Mathar, Jul 12 2014
  • Mathematica
     f[s_List] := f[n] = Block[{k = s[[-1]] + 1, ss = Union[Plus @@@ Subsets[s]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#] &, {0, 2, 3, 4}, 16]

Extensions

Corrected by R. J. Mathar, Jul 12 2014

A244749 0-additive sequence: a(n) is the smallest number larger than a(n-1) that is not the sum of any subset of earlier terms, starting with initial values {2, 5}.

Original entry on oeis.org

2, 5, 6, 9, 10, 28, 29, 85, 86, 256, 257, 769, 770, 2308, 2309, 6925, 6926, 20776, 20777, 62329, 62330, 186988, 186989, 560965, 560966, 1682896, 1682897, 5048689, 5048690, 15146068, 15146069, 45438205, 45438206, 136314616, 136314617, 408943849, 408943850, 1226831548, 1226831549
Offset: 1

Views

Author

Keywords

Comments

This sequence differs from A003664.

Examples

			The numbers 11-27 are not in the sequence since some combination of the previous terms add to it. example 17=2+5+10.
The number 28 however is a term since no combination of the previous terms cannot be found which sum to 28.
		

References

  • R. K. Guy, "s-Additive sequences," preprint, 1994.

Crossrefs

Programs

  • Mathematica
    f[s_List] := f[n] = Block[{k = s[[-1]] + 1, ss = Union[ Plus @@@ Subsets[s]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[ f[#] &, {2, 5}, 20] (* or *)
    b = LinearRecurrence[{4, -3}, {9, 28}, 18]; Join[{2, 5, 6}, Riffle[b, b + 1]]
    Join[{2, 5, 6},LinearRecurrence[{-1, 3, 3},{9, 10, 28},36]] (* Ray Chandler, Aug 03 2015 *)
  • PARI
    Vec(x*(7*x^5+14*x^4+6*x^3-5*x^2-7*x-2)/((x+1)*(3*x^2-1)) + O(x^100)) \\ Colin Barker, Jul 11 2014

Formula

a(2n) = 4a(2n - 2) - 3a(2n - 4) and a(2n +1) = a(2n) +1, for n>2.
a(n) = -a(n-1) + 3*a(n-2) + 3*a(n-3) for n>6. - Colin Barker, Jul 11 2014
G.f.: x*(7*x^5+14*x^4+6*x^3-5*x^2-7*x-2) / ((x+1)*(3*x^2-1)). - Colin Barker, Jul 11 2014
Showing 1-4 of 4 results.