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-7 of 7 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

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 16, 18, 20, 23, 25, 27, 29, 31, 36, 38, 40, 42, 44, 51, 53, 55, 57, 64, 66, 68, 70, 72, 77, 79, 81, 83, 85, 92, 94, 96, 98, 105, 107, 109, 111, 118, 120, 122, 124, 126, 131, 133, 135, 137, 139, 146, 148, 150, 152, 159, 161, 163
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2001

Keywords

Comments

Numbers {1,3,10,12,14,16,18,23,25,27,29,31,38,40,42,44,51,53} mod 54 plus {2,4,5,6,7,8,9,20,36}.

Examples

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

Crossrefs

Programs

  • 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 > 4, k++]; Append[s, k]]; Nest[f[#, 2] &, {1, 2}, 70] (* Robert G. Wilson v, Jul 05 2014 *)
    CoefficientList[Series[(5 x^39 - 3 x^38 + 3 x^34 - x^33 + 5 x^29 + x^27 + x^26 + 6 x^25 + x^24 + x^23 + x^22 + x^21 + 4 x^20 + x^19 + x^18 + 2 x^17 + 2 x^16 + 3 x^15 + 2 x^14 + 2 x^13 + 2 x^12 + 2 x^11 + 2 x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1) / (x^19 - x^18 - 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-18) - a(n-19) for n > 40.
G.f.: x*(5*x^39 - 3*x^38 + 3*x^34 - x^33 + 5*x^29 + x^27 + x^26 + 6*x^25 + x^24 + x^23 + x^22 + x^21 + 4*x^20 + x^19 + x^18 + 2*x^17 + 2*x^16 + 3*x^15 + 2*x^14 + 2*x^13 + 2*x^12 + 2*x^11 + 2*x^10 + x^9 + x^8 + x^7 + x^6 + x^5 + x^4 + x^3 + x^2 + x + 1)/(x^19 - x^18 - x + 1). (End)

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

A060471 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, 7, 8, 10, 12, 14, 16, 19, 21, 23, 25, 30, 32, 34, 36, 41, 43, 45, 47, 52, 54, 56, 58, 63, 65, 67, 69, 74, 76, 78, 80, 85, 87, 89, 91, 96, 98, 100, 102, 107, 109, 111, 113, 118, 120, 122, 124, 129, 131, 133, 135, 140, 142, 144, 146, 151, 153, 155, 157
Offset: 1

Views

Author

Henry Bottomley, Mar 15 2001

Keywords

Comments

Numbers {1,3,8,10} mod 11 plus {2,4,5,6,7,16}. Note that while the cases for "zero", "one", "two" and "four" essentially involve a third of the natural numbers, this case for "three" involves 4/11.

Examples

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

Crossrefs

Programs

  • 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 > 3, k++]; Append[s, k]]; Nest[f[#, 2] &, {1, 2}, 70] (* Robert G. Wilson v, Jul 05 2014 *)

Formula

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

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