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.

User: Jackson Haselhorst

Jackson Haselhorst's wiki page.

Jackson Haselhorst has authored 4 sequences.

A322558 a(0)=1, a(1)=1; for n>1, a(n)=a(n-1)+a(n-2) if a(n-1) is less than or equal to n-1, otherwise a(n)=a(n-1)-(n-1).

Original entry on oeis.org

1, 1, 2, 3, 5, 1, 6, 7, 13, 5, 18, 8, 26, 14, 1, 15, 16, 31, 14, 45, 26, 6, 32, 10, 42, 18, 60, 34, 7, 41, 12, 53, 22, 75, 42, 8, 50, 14, 64, 26, 90, 50, 9, 59, 16, 75, 30, 105, 58, 10, 68, 18, 86, 34, 120, 66, 11, 77, 20, 97, 38, 135, 74, 12, 86, 22, 108, 42, 150, 82, 13, 95, 24, 119, 46, 165, 90, 14, 104, 26
Offset: 0

Author

Jackson Haselhorst, Aug 28 2019

Keywords

Comments

The graph of the sequence appears random until n>16, after which the graph creates seven distinct lines.

Crossrefs

Programs

  • Mathematica
    a[0] = a[1] = 1; a[n_] := a[n] = If[a[n - 1] <= n - 1, a[n - 1] + a[n - 2], a[n - 1] - n + 1]; Array[a, 100, 0] (* Amiram Eldar, Aug 29 2019 *)
  • PARI
    Vec((1 + x + 2*x^2 + 3*x^3 + 5*x^4 + x^5 + 6*x^6 + 5*x^7 + 11*x^8 + x^9 + 12*x^10 - 2*x^11 + 24*x^12 + 2*x^13 - 12*x^14 - 10*x^15 + 8*x^16 - 2*x^17 + 3*x^18 - 6*x^19 + 4*x^20 + 11*x^21 + 15*x^22 - 17*x^23 - 2*x^24 - 2*x^25 - 4*x^26 - 4*x^27 - 4*x^28 - 8*x^29 + 8*x^30) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)^2) + O(x^40)) \\ Colin Barker, Aug 29 2019

Formula

For n>16, the sequence follows a pattern of seven, and each term lies on one of the following lines:
If n is of the form 7k+3, then a(n) = (11/7)n+(30/7);
if n is of the form 7k+4, then a(n) = (4/7)n+(26/7);
if n is of the form 7k+5, then a(n) = (15/7)n+(30/7);
if n is of the form 7k+6, then a(n) = (8/7)n+(22/7);
if n is of the form 7k, then a(n) = (1/7)n+3;
if n is of the form 7k+1, then a(n) = (9/7)n+(26/7);
if n is of the form 7k+2, then a(n) = (2/7)n+(24/7).
From Colin Barker, Aug 29 2019: (Start)
G.f.: (1 + x + 2*x^2 + 3*x^3 + 5*x^4 + x^5 + 6*x^6 + 5*x^7 + 11*x^8 + x^9 + 12*x^10 - 2*x^11 + 24*x^12 + 2*x^13 - 12*x^14 - 10*x^15 + 8*x^16 - 2*x^17 + 3*x^18 - 6*x^19 + 4*x^20 + 11*x^21 + 15*x^22 - 17*x^23 - 2*x^24 - 2*x^25 - 4*x^26 - 4*x^27 - 4*x^28 - 8*x^29 + 8*x^30) / ((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)^2).
a(n) = 2*a(n-7) - a(n-14) for n>30.
(End)

A316823 Balanced nonary enumeration (or balanced nonary representation) of integers; write n in nonary (base 9) and then replace 5's with (-4)'s, 6's with (-3)'s, 7's with (-2)'s, and 8's with (-1)'s.

Original entry on oeis.org

0, 1, 2, 3, 4, -4, -3, -2, -1, 9, 10, 11, 12, 13, 5, 6, 7, 8, 18, 19, 20, 21, 22, 14, 15, 16, 17, 27, 28, 29, 30, 31, 23, 24, 25, 26, 36, 37, 38, 39, 40, 32, 33, 34, 35, -36, -35, -34, -33, -32, -40, -39, -38, -37, -27, -26, -25, -24, -23, -31, -30, -29, -28
Offset: 0

Author

Jackson Haselhorst, Aug 26 2019

Keywords

Examples

			Since 35_10=38_9, the digits of 35 in base 9 are 3 and 8. 8>4, so it is replaced with (-1). The digits are then 3 and -1, so a(35)=3*9^1+(-1)*9^0=27-1=26.
		

Crossrefs

Column k=4 of A319047.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          9*a(iquo(n, 9))+mods(n, 9))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 26 2019
  • PARI
    f(x) = if (x > 9/2, -(9-x), x);
    a(n) = subst(Pol(apply(x->f(x), digits(n, 9)), 'x), 'x, 9); \\ Michel Marcus, Aug 27 2019

A309991 Balanced quinary (base 5) enumeration (or balanced quinary representation) of integers, write n in quinary, and then replace 3's with (-2)'s and 4's with (-1)'s.

Original entry on oeis.org

0, 1, 2, -2, -1, 5, 6, 7, 3, 4, 10, 11, 12, 8, 9, -10, -9, -8, -12, -11, -5, -4, -3, -7, -6, 25, 26, 27, 23, 24, 30, 31, 32, 28, 29, 35, 36, 37, 33, 34, 15, 16, 17, 13, 14, 20, 21, 22, 18, 19, 50, 51, 52, 48, 49, 55, 56, 57, 53, 54, 60, 61, 62, 58, 59, 40, 41
Offset: 0

Author

Jackson Haselhorst, Aug 26 2019

Keywords

Comments

This sequence, like the balanced ternary sequence, will eventually include every integer exactly once.

Crossrefs

Cf. A117966.
Column k=2 of A319047.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          5*a(iquo(n, 5))+mods(n, 5))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 26 2019
  • Mathematica
    Table[FromDigits[IntegerDigits[n,5]/.{3->-2,4->-1},5],{n,0,120}] (* Harvey P. Dale, Sep 05 2020 *)
  • PARI
    a(n) = subst(Pol(apply(d->if(d>2, d-5, d), digits(n, 5)), 'x), 'x, 5) \\ Andrew Howroyd, Aug 26 2019

A309995 Balanced septenary enumeration (or balanced septenary representation) of integers; write n in septenary and then replace 4's with (-3),s, 5's with (-2)'s, and 6's with (-1)'s.

Original entry on oeis.org

0, 1, 2, 3, -3, -2, -1, 7, 8, 9, 10, 4, 5, 6, 14, 15, 16, 17, 11, 12, 13, 21, 22, 23, 24, 18, 19, 20, -21, -20, -19, -18, -24, -23, -22, -14, -13, -12, -11, -17, -16, -15, -7, -6, -5, -4, -10, -9, -8, 49, 50, 51, 52, 46, 47, 48, 56, 57, 58, 59, 53, 54, 55, 63
Offset: 0

Author

Jackson Haselhorst, Aug 26 2019

Keywords

Comments

This sequence, like the balanced ternary and quinary sequences, includes every integer exactly once.

Examples

			As 54_10 = 105_7, the digits of 54 in base 7 are 1, 0 and 5. 5 > 3 so it's replaced by -2. The digits then are 1, 0 and -2 giving a(54) = 1*7^2 + 0 * 7^1 + (-2) * 7^0 = 49 + 0 - 2 = 47. - _David A. Corneth_, Aug 26 2019
		

Crossrefs

Column k=3 of A319047.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=0, 0,
          7*a(iquo(n, 7))+mods(n, 7))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 26 2019
  • PARI
    a(n,b=7) = fromdigits(apply(d -> if (dRémy Sigrist, Aug 26 2019
    
  • PARI
    a(n) = my(d = digits(n, 7)); for(i = 1, #d, if(d[i] > 3, d[i]-=7)); fromdigits(d, 7) \\ David A. Corneth, Aug 26 2019