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.

Previous Showing 11-20 of 35 results. Next

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)

A276204 a(0) = a(1) = 0. For n>1 a(n) is the smallest nonnegative integer such that there is no arithmetic progression k,m,n (of length 3) such that a(k)+a(m) = a(n).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 4, 4, 1, 4, 4, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 4, 4, 1, 4, 4, 1, 2, 2, 1, 7, 7, 1, 7, 7, 1, 2, 2, 1, 7, 7, 1, 7, 7, 1, 2, 2, 1, 4, 4, 1, 4, 4, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 4, 4, 1, 4, 4, 1, 2, 2, 1, 0, 0, 1, 0, 0, 1, 2, 2, 1, 0, 0, 1, 0
Offset: 0

Views

Author

Michal Urbanski, Aug 24 2016

Keywords

Comments

The sequence has the same set of values as A033627.
The sequence has a kind of a "triple rhythm", compare the distribution of zeros to the Cantor set.
Conjecture 1:
One can calculate a(n) in a following, non-recursive way, using the ternary representation of n.
Let n>=0 be an integer. We consider two cases:
1. There is no digit 2 in the ternary representation of n. Then a(n) = 0.
2. There is a digit 2 in the ternary representation of n.
Let i be the number of the position (counting from right) of the rightmost digit 2 in ternary representation of n, then a(n) = A033627(i).
For example: let n = 19. The ternary representation of 19 is 201. The rightmost digit 2 in the number 201 is on the third position (counting from right), so a(19) = A033627(3) = 4.
Conjecture 2:
The sequence can be generated in a following way:
Start with a zero. Take three consecutive copies of all you have, replace all zeros in the third copy with the next value of A033627, repeat.
Both of these conjectures can be generalized for similarly defined sequences where the length of the arithmetic progression in the definition (in A276204 it is 3) is a prime number, see A276206.
The assumption about primality is essential, for complex lengths of the arithmetic progression the sequence is irregular, see A276205.

Examples

			For n = 6 we have that:
a(6)>0, because a(0)+a(3)=0 and 0,3,6 is an arithmetic progression.
a(6)>1, because a(4)+a(5)=0 and 4,5,6 is an arithmetic progression.
There is no such arithmetic progression k,m,6 that a(k)+a(m) = 2, so a(6) = 2.
		

Crossrefs

Cf. A276205 (length 4), A276206 (length 5), A276207 (any length).

A051040 5-Stohr sequence.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 63, 94, 125, 156, 187, 218, 249, 280, 311, 342, 373, 404, 435, 466, 497, 528, 559, 590, 621, 652, 683, 714, 745, 776, 807, 838, 869, 900, 931, 962, 993, 1024, 1055, 1086, 1117, 1148, 1179, 1210, 1241, 1272, 1303, 1334, 1365, 1396, 1427
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

Formula

Terms are 2^(n-1) up to a(6) and then 31n-154.
a(n) = 31*n-154 for n>5. a(n) = 2*a(n-1)-a(n-2) for n>7. G.f.: x*(15*x^6+8*x^5+4*x^4+2*x^3+x^2+1)/(x-1)^2. - Colin Barker, Sep 19 2012

Extensions

Corrected by Henry Bottomley, May 29 2001

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

A075123 a(n) is the least positive integer > a(n-1) and a(n) is not 2*a(i)+a(j) for 1<=i

Original entry on oeis.org

1, 2, 3, 6, 9, 14, 17, 22, 25, 30, 33, 38, 41, 46, 49, 54, 57, 62, 65, 70, 73, 78, 81, 86, 89, 94, 97, 102, 105, 110, 113, 118, 121, 126, 129, 134, 137, 142, 145, 150, 153, 158, 161, 166, 169, 174, 177, 182, 185, 190, 193, 198, 201, 206, 209, 214, 217, 222, 225, 230
Offset: 1

Views

Author

Floor van Lamoen, Sep 02 2002

Keywords

Comments

a(n) = A047452(n-2) for n > 3 because of first formula. - Georg Fischer, Oct 19 2018

Crossrefs

Programs

  • Mathematica
    Join[{1,2,3},Table[4n-10-Mod[n,2],{n,4,60}]] (* or *)
    LinearRecurrence[ {1,1,-1},{1,2,3,6,9,14},60] (* Harvey P. Dale, Oct 28 2012 *)
  • Python
    def A075123(n): return (n-2<<2)-2-(n&1) if n>3 else n # Chai Wah Wu, Mar 30 2024

Formula

a(n) = 4n - 10 - (n mod 2), for n>3. - Ralf Stephan, Nov 16 2004
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 3. - Harvey P. Dale, Oct 28 2012
G.f.: x*(1+x+2*x^3+2*x^4+2*x^5)/((1+x)*(1-x)^2). - Georg Fischer, May 15 2019

A257941 Lexicographically earliest sequence of positive integers such that the terms and their absolute first differences are all distinct and no term is the sum of two distinct earlier terms.

Original entry on oeis.org

1, 3, 7, 12, 18, 26, 9, 20, 34, 24, 39, 55, 22, 45, 66, 28, 47, 72, 85, 49, 76, 108, 68, 99, 53, 82, 112, 70, 114, 149, 74, 122, 172, 93, 145, 203, 101, 160, 95, 162, 216, 118, 187, 224, 141, 214, 143, 235, 139, 195, 281, 164, 241, 329, 166, 260, 170, 283, 168
Offset: 1

Views

Author

Eric Angelini and Alois P. Heinz, May 13 2015

Keywords

Comments

The sequence of absolute first differences begins: 2, 4, 5, 6, 8, 17, 11, 14, 10, 15, 16, 33, 23, 21, 38, 19, 25, 13, 36, 27, 32, 40, ... .
The sequence is 0-additive.

Crossrefs

Programs

  • Maple
    s:= proc() false end: b:= proc() false end:
    a:= proc(n) option remember; local i, k;
          if n=1 then b(1):= true; 1
        else for k while b(k) or s(k) or
             (t-> b(t) or t=k)(abs(a(n-1)-k)) do od;
             for i to n-1 do s(a(i)+k):= true od;
             b(k), b(abs(a(n-1)-k)):= true$2; k
          fi
        end:
    seq(a(n), n=1..101);
  • Mathematica
    s[] = False; b[] = False;
    a[n_] := a[n] = Module[{i, k}, If[n == 1, b[1] = True; 1, For[k = 1, b[k] || s[k] || Function[t, b[t] || t == k][Abs[a[n-1]-k]], k++]; For[i = 1, i <= n-1, i++, s[a[i]+k] = True]; {b[k], b[Abs[a[n-1]-k]]} = {True, True}; k]];
    Array[a, 101] (* Jean-François Alcover, Oct 28 2020, after Maple *)

A244151 0-additive sequence: start with a(1) = 2; thereafter, a(n) = smallest number not already in sequence which is not the sum of any previous two terms.

Original entry on oeis.org

2, 3, 4, 8, 9, 14, 15, 20, 21, 26, 27, 32, 33, 38, 39, 44, 45, 50, 51, 56, 57, 62, 63, 68, 69, 74, 75, 80, 81, 86, 87, 92, 93, 98, 99, 104, 105, 110, 111, 116, 117, 122, 123, 128, 129, 134, 135, 140, 141, 146, 147, 152, 153, 158, 159, 164, 165, 170, 171, 176, 177, 182, 183, 188, 189, 194, 195, 200, 201, 206, 207, 212, 213
Offset: 1

Views

Author

Leonardo Sznajder, Jun 21 2014

Keywords

Comments

As A033627, but first term is 2.
4 and the numbers in A047243. - Joerg Arndt, Jun 22 2014

Crossrefs

Programs

  • Mathematica
    f[s_List] := Block[{k = s[[-1]] + 1, ss = Union[Plus @@@ Subsets[s, {2}]]}, While[ MemberQ[ss, k], k++]; Append[s, k]]; Nest[f, {2}, 70] (* Robert G. Wilson v, Jun 23 2014 *)
  • PARI
    Vec(x*(x^5+3*x^3-x^2+x+2)/((x-1)^2*(x+1)) + O(x^100)) \\ Colin Barker, Jun 26 2014

Formula

a(2n) = 6(n-1)+2 & a(2n+1) = 6(n-1)+3 for n>1. - Robert G. Wilson v, Jun 23 2014
From Colin Barker, Jun 26 2014: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) for n > 6.
G.f.: x*(x^5 + 3*x^3 - x^2 + x + 2)/((x - 1)^2*(x + 1)). (End)
E.g.f.: (x^3 + 3*x^2 + 30*x + 24)/6 + (3*x - 4)*cosh(x) + 3*(x - 2)*sinh(x). - Stefano Spezia, Apr 15 2023

Extensions

Added terms >= 20, Joerg Arndt, Jun 22 2014

A301451 Numbers congruent to {1, 7} mod 9.

Original entry on oeis.org

1, 7, 10, 16, 19, 25, 28, 34, 37, 43, 46, 52, 55, 61, 64, 70, 73, 79, 82, 88, 91, 97, 100, 106, 109, 115, 118, 124, 127, 133, 136, 142, 145, 151, 154, 160, 163, 169, 172, 178, 181, 187, 190, 196, 199, 205, 208, 214, 217, 223, 226, 232, 235, 241, 244, 250, 253, 259, 262, 268
Offset: 1

Views

Author

Bruno Berselli, Mar 21 2018

Keywords

Comments

First bisection of A056991, second bisection of A242660.
The squares of the terms of A174396 are the squares of this sequence.

Crossrefs

Cf. A274406: numbers congruent to {0, 8} mod 9.
Cf. A193910: numbers congruent to {2, 6} mod 9.

Programs

  • GAP
    a := [1,7,10];; for n in [4..60] do a[n] := a[n-1] + a[n-2] - a[n-3]; od; a;
    
  • Magma
    &cat [[9*n+1, 9*n+7]: n in [0..40]];
    
  • Mathematica
    Table[2 (2 n - 1) + (2 n - 3 (1 - (-1)^n))/4, {n, 1, 60}]
    {#+1,#+7}&/@(9*Range[0,30])//Flatten (* or *) LinearRecurrence[{1,1,-1},{1,7,10},60] (* Harvey P. Dale, Nov 08 2020 *)
  • PARI
    Vec(x*(1 + 6*x + 2*x^2) / ((1 - x)^2*(1 + x)) + O(x^60)) \\ Colin Barker, Mar 22 2018
  • Python
    [2*(2*n-1)+(2*n-3*(1-(-1)**n))/4 for n in range(1,70)]
    
  • Sage
    [n for n in (1..300) if n % 9 in (1,7)]
    

Formula

O.g.f.: x*(1 + 6*x + 2*x^2)/((1 + x)*(1 - x)^2).
E.g.f.: (3 + 8*exp(x) - 11*exp(2*x) + 18*x*exp(2*x))*exp(-x)/4.
a(n) = a(n-1) + a(n-2) - a(n-3).
a(n) = 2*(2*n - 1) + (2*n - 3*(1 - (-1)^n))/4. Therefore, for n even a(n) = (9*n - 4)/2, otherwise a(n) = (9*n - 7)/2.
a(2n+1) = A017173(n). a(2n) = A017245(n-1). - R. J. Mathar, Feb 28 2019
Previous Showing 11-20 of 35 results. Next