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

A060469 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, 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
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2001

Keywords

Comments

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

Examples

			11 is in the sequence since it is 3+8 but no other sum of two distinct terms.
		

Crossrefs

Virtually identical to A003662.

Programs

  • Mathematica
    LinearRecurrence[{1, 0, 0, 1, -1}, {1, 2, 3, 4, 6, 8, 11, 13, 16, 18, 23}, 100] (* Paolo Xausa, Mar 04 2024 *)
  • PARI
    Vec(x*(2*x^10+x^8+x^7+2*x^6+x^5+x^4+x^3+x^2+x+1)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100)) \\ Colin Barker, Feb 27 2015

Formula

a(n) = a(n-1)+a(n-4)-a(n-5) for n>9. - Colin Barker, Feb 27 2015
G.f.: x*(2*x^10+x^8+x^7+2*x^6+x^5+x^4+x^3+x^2+x+1) / ((x-1)^2*(x+1)*(x^2+1)). - Colin Barker, Feb 27 2015
a(n) = (6*n - 22 - (-1)^n + A056594(n) - A056594(n+1))/2 for n > 6. - Stefano Spezia, Mar 11 2025

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

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

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