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.

A347834 An array A of the positive odd numbers, read by antidiagonals upwards, giving the present triangle T.

Original entry on oeis.org

1, 3, 5, 7, 13, 21, 9, 29, 53, 85, 11, 37, 117, 213, 341, 15, 45, 149, 469, 853, 1365, 17, 61, 181, 597, 1877, 3413, 5461, 19, 69, 245, 725, 2389, 7509, 13653, 21845, 23, 77, 277, 981, 2901, 9557, 30037, 54613, 87381, 25, 93, 309, 1109, 3925, 11605, 38229, 120149, 218453, 349525
Offset: 1

Views

Author

Wolfdieter Lang, Sep 20 2021

Keywords

Comments

For the definition of this array A see the formula section.
The rows of A appear in a draft by Immmo O. Kerner in eqs. (1) and (2) as so-called horizontal sequences (horizontale Folgen). Thanks to Dr. A. Eckert for sending me this paper.
This array with entry A(k, n) becomes equal to the array T with T(n, k) given in A178415 by using a permutation of the rows, and changing the offset: A(k, n) = T(pe(k), n+1), with pe(3*(L+1)) = 4*(L+1), pe(1+3*L) = 1 + 2*L, pe(2+3*L) = 2*(1 + 2*L), for L >= 0. This permutation appears in A265667.
A proper sub-array is A238475(n, k) = A(1 + 3*(k-1), n-1), for k >= 1 and n >= 1.
In the directed Collatz tree with nodes labeled with only positive odd numbers (see A256598 for the paths), here called CTodd, the level L = 0 (on the top) has the node with label 1 as root. Because 1 -> 1 there is an arrow (a 1-cycle or loop) at the root. The level L = 1 consists of the nodes with labels A(1, n), for n >= 1, and each node is connected to 1 by a downwards directed arrow. The next levels for L >= 2 are obtained using the successor rule (used also by Kerner): S(u) = (4*u - 1)/3 if u == 1 (mod 3), (2*u - 1)/3 if u == 5 (mod 3), and there is no successor S(u) = empty if u = 3 (mod 6), that is, this node is a leaf.
However, each node with label u on level L >= 1, except a leaf, has as successors at level L + 1 not only the node with S(u) but all the nodes with labels A(S(u), n), for n >= 0.
In this way each node (also the root) of this CTodd has in-degree 1 and infinite out-degree (for L >= 2 there are infinitely many infinite outgoing arrows). All nodes with label A(k, n) with n >= 1, have the same precursor as the node A(k,0) in this tree for each k >= 1.
Except for the loop (1-cycle) for the root 1 there are no cycles in this directed tree CTodd.
That each number N = 5 + 8*K, for K >= 0 appears in array A for some column n >= 1 uniquely can be proved, using the fact of strictly increasing rows and columns, by showing that the columns n = 1, 2, ..., c contain all positive integers congruent to 5 modulo 8 except those of the positive congruence class A(1, c+1) modulo 2^(2*c+3) by induction on c. [added Dec 05 2021]
Row index k for numbers congruent to 5 modulo 8: Each number N = 5 + 8*K, for K >= 0, from A004770 is a member of row k of the array A starting with element A(k, 0) = (2*A065883(2 + 3*N) - 1)/3. For this surjective map see A347840. [simplified Dec 05 2021]
The Collatz conjecture can be reduced to the conjecture that in this rooted and directed tree CTodd each positive odd number appears as a label once, that is, all entries of the array A appear.

Examples

			The array A(k, n) begins:
k\n  0   1   2    3    4     5      6      7       8       9       10 ...
-------------------------------------------------------------------------
1:   1   5  21   85  341  1365   5461  21845   87381  349525  1398101
2:   3  13  53  213  853  3413  13653  54613  218453  873813  3495253
3:   7  29 117  469 1877  7509  30037 120149  480597 1922389  7689557
4:   9  37 149  597 2389  9557  38229 152917  611669 2446677  9786709
5:  11  45 181  725 2901 11605  46421 185685  742741 2970965 11883861
6:  15  61 245  981 3925 15701  62805 251221 1004885 4019541 16078165
7:  17  69 277 1109 4437 17749  70997 283989 1135957 4543829 18175317
8:  19  77 309 1237 4949 19797  79189 316757 1267029 5068117 20272469
9:  23  93 373 1493 5973 23893  95573 382293 1529173 6116693 24466773
10: 25 101 405 1621 6485 25941 103765 415061 1660245 6640981 26563925
...
--------------------------------------------------------------------
The triangle T(k, n) begins:
k\n  0  1   2    3    4     5     6      7      8      9 ...
------------------------------------------------------------
1:   1
2:   3  5
3:   7 13  21
4:   9 29  53   85
5:  11 37 117  213  341
6:  15 45 149  469 853   1365
7:  17 61 181  597 1877  3413  5461
8:  19 69 245  725 2389  7509 13653  21845
9:  23 77 277  981 2901  9557 30037  54613  87381
10: 25 93 309 1109 3925 11605 38229 120149 218453 349525
...
-------------------------------------------------------------
Row index k of array A, for entries 5 (mod 8).
213 = 5 + 8*26. K = 28 is even, (3*231+1)/16 = 40, A065883(40) = 10, hence A(k, 0) = N' = (10-1)/3 = 3, and k = 2. Moreover, n = log_4((3*213 + 1)/(3*A(2,0) + 1)) = log_4(64) = 3. 213 = A(2, 3).
85 = 5 + 8*10. K = 10 is even, (3*85 + 1)/16 = 16, A065883(16) = 1, N' = (1-1)/3 = 0 is even, hence A(k, 0) = 4*0 + 1 = 1, k = 1. 85 = A(1, 3).
61 = 5 + 8*7, K = 7 is odd, k = (7+1)/2 + ceiling((7+1)/4) = 6, and n = log_4((3*61 + 1)/(3*A(6,0) + 1)) = 1. 61 = A(6, 1).
----------------------------------------------------------------------------
		

Crossrefs

Row sequences of the array A, also diagonal sequences of the triangle T: -A007583 (k=0), A002450(n+1), A072197, A072261(n+1), A206374(n+1), A072262(n+1), A072262(n+1), A072201(n+1), A330246(n+1), ...
Column sequences of the array A, also of the triangle T (shifted): A047529, A347836, A347837, ...

Programs

  • Maple
    # Seen as an array:
    A := (n, k) -> ((3*(n + floor(n/3)) - 1)*4^(k+1) - 2)/6:
    for n from 1 to 6 do seq(A(n, k), k = 0..9) od;
    # Seen as a triangle:
    T := (n, k) -> 2^(2*k + 1)*(floor((n - k)/3) - k + n - 1/3) - 1/3:
    for n from 1 to 9 do seq(T(n, k), k = 0..n-1) od;
    # Using row expansion:
    gf_row := k -> (1 / (x - 1) - A047395(k)) / (4*x - 1):
    for k from 1 to 10 do seq(coeff(series(gf_row(k), x, 11), x, n), n = 0..10) od;
    # Peter Luschny, Oct 09 2021
  • Mathematica
    A347834[k_, n_] := (4^n*(6*(Floor[k/3] + k) - 2) - 1)/3;
    Table[A347834[k - n, n], {k, 10}, {n, 0, k - 1}] (* Paolo Xausa, Jun 26 2025 *)

Formula

Array A:
A(k, 0) = A047529(k) (the positive odd numbers {1, 3, 7} (mod 8));
A(k, n) = ((3* A(k, 0) + 1)*4^n - 1)/3, for k >= 1 and n >= 0.
Recurrence for rows k >= 1: A(k, n) = 4*A(k, n-1) + 1, for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k).
Explicit form: A(k, n) = ((3*(k + floor(k/3)) - 1)*4^(n+1) - 2)/6, k >= 1, n >= 0. Here 3*(k + floor(k/3)) = A319451(k).
Hence A(k, n) = 5 + 8*(2*A(k, n-2)), for n >= 1, with A(k, 0) = 2*(k + floor(k/3)) - 1 = A047529(k), and 2*A(k, -1) = (A(k, 1) - 5)/8 = k - 1 + floor(k/3) (equals index n of A(k, 1) in the sequence (A004770(n+1))_{n >= 0}). A(k, -1) is half-integer if k = A007494(m) = m + ceiling(m/2), for m >= 1, and A(k, -1) = 2*K if k = 1 + 3*K = A016777(K), for K >= 0.
O.g.f.: expansion in z gives o.g.f.s for rows k, also for k = 0: -A007583; expansion in x gives o.g.f.s for columns n.
G(z, x) = (2*(-1 + 3*z + 3*z^2 + 7*z^3)*(1-x) - (1-4*x)*(1-z^3)) / (3*(1-x)*(1-4*x)*(1-z)*(1-z^3)).
Triangle T:
T(k, n) = A(k - n, n), for k >= 1 and n = 0..k-1.
A(k, n) = [x^n] (1/(x - 1) - A047395(k)) / (4*x - 1). - Peter Luschny, Oct 09 2021

A047464 Numbers that are congruent to {0, 2, 4} mod 8.

Original entry on oeis.org

0, 2, 4, 8, 10, 12, 16, 18, 20, 24, 26, 28, 32, 34, 36, 40, 42, 44, 48, 50, 52, 56, 58, 60, 64, 66, 68, 72, 74, 76, 80, 82, 84, 88, 90, 92, 96, 98, 100, 104, 106, 108, 112, 114, 116, 120, 122, 124, 128, 130, 132, 136, 138, 140, 144, 146, 148, 152, 154, 156
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [0, 2, 4]]; // Wesley Ivan Hurt, Jun 10 2016
  • Maple
    A047464:=n->2*(12*n-15-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9: seq(A047464(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
  • Mathematica
    Flatten[#+{0,2,4}&/@(8Range[0,20])] (* or *) LinearRecurrence[{1,0,1,-1}, {0,2,4,8}, 80] (* Harvey P. Dale, May 04 2013 *)

Formula

a(n) = 2*floor((n-1)/3)+2*n-2. - Gary Detlefs, Mar 18 2010
a(n) = 2*A004773(n-1). G.f.: 2*x^2*(1+x+2*x^2)/((1+x+x^2)*(x-1)^2). - R. J. Mathar, Mar 29 2010
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 2*(12*n-15-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-4, a(3k-1) = 8k-6, a(3k-2) = 8k-8. (End)
Sum_{n>=2} (-1)^n/a(n) = (sqrt(2)-1)*Pi/16 + (2-sqrt(2))*log(2)/16 + sqrt(2)*log(sqrt(2)+2)/8. - Amiram Eldar, Dec 19 2021
a(n) = A047217(n)+n-1. - R. J. Mathar, Aug 25 2025

A047410 Numbers that are congruent to {2, 4, 6} mod 8.

Original entry on oeis.org

2, 4, 6, 10, 12, 14, 18, 20, 22, 26, 28, 30, 34, 36, 38, 42, 44, 46, 50, 52, 54, 58, 60, 62, 66, 68, 70, 74, 76, 78, 82, 84, 86, 90, 92, 94, 98, 100, 102, 106, 108, 110, 114, 116, 118, 122, 124, 126, 130, 132, 134, 138, 140, 142, 146, 148, 150, 154, 156, 158
Offset: 1

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0( 17 ).

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [2, 4, 6]]; // Wesley Ivan Hurt, Jun 09 2016
  • Maple
    A047410:=n->2*(12*n-6-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9: seq(A047410(n), n=1..100); # Wesley Ivan Hurt, Jun 09 2016
  • Mathematica
    With[{upto=140},Complement[2*Range[upto/2],8*Range[upto/8]]] (* or *) LinearRecurrence[{1,0,1,-1}, {2,4,6,10}, 60] (* Harvey P. Dale, Oct 06 2014 *)

Formula

a(n) = 2*floor((n-1)/3) + 2*n. - Gary Detlefs, Mar 18 2010
From R. J. Mathar, Dec 05 2011: (Start)
G.f.: 2*x*(1+x)*(1+x^2) / ( (1+x+x^2)*(x-1)^2 ).
a(n) = 2*A042968(n). (End)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4, with a(1)=2, a(2)=4, a(3)=6, a(4)=10. - Harvey P. Dale, Oct 06 2014
From Wesley Ivan Hurt, Jun 09 2016: (Start)
a(n) = 2*(12*n-6-3*cos(2*n*Pi/3)+sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-2, a(3k-1) = 8k-4, a(3k-2) = 8k-6. (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/16. - Amiram Eldar, Dec 19 2021
E.g.f.: 2*(9 + 6*exp(x)*(2*x - 1) - exp(-x/2)*(3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, Oct 17 2022

A047407 Numbers that are congruent to {0, 4, 6} mod 8.

Original entry on oeis.org

0, 4, 6, 8, 12, 14, 16, 20, 22, 24, 28, 30, 32, 36, 38, 40, 44, 46, 48, 52, 54, 56, 60, 62, 64, 68, 70, 72, 76, 78, 80, 84, 86, 88, 92, 94, 96, 100, 102, 104, 108, 110, 112, 116, 118, 120, 124, 126, 128, 132, 134, 136, 140, 142, 144, 148, 150, 152, 156
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..160] | n mod 8 in [0, 4, 6]]; // Vincenzo Librandi, May 02 2016
    
  • Maple
    A047407:=n->2*(12*n-9-2*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047407(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
  • Mathematica
    Select[Range[0,200], MemberQ[{0,4,6}, Mod[#,8]]&] (* or *) LinearRecurrence[{1,0,1,-1}, {0,4,6,8}, 70] (* Harvey P. Dale, Apr 20 2016 *)
  • PARI
    a(n)=n\3*8+[-2,0,4][n%3+1] \\ Charles R Greathouse IV, May 02 2016

Formula

From R. J. Mathar, Dec 05 2011: (Start)
a(n) = 2*A004772(n).
G.f.: 2*x^2*(2+x+x^2) / ((1+x+x^2)*(x-1)^2). (End)
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = 2*(12*n-9-2*sqrt(3)*sin(2*n*Pi/3))/9.
a(3k) = 8k-2, a(3k-1) = 8k-4, a(3k-2) = 8k-8. (End)
a(n) = 2*(n - 1 + floor((n + 1)/3)). - Wolfdieter Lang, Sep 11 2021
Sum_{n>=2} (-1)^n/a(n) = (2-sqrt(2))*log(2)/16 + sqrt(2)*log(sqrt(2)+2)/8 - (sqrt(2)-1)*Pi/16. - Amiram Eldar, Dec 19 2021

A262523 a(n+3) = a(n) + 6*n + 13, a(0)=0, a(1)=2, a(2)=7.

Original entry on oeis.org

0, 2, 7, 13, 21, 32, 44, 58, 75, 93, 113, 136, 160, 186, 215, 245, 277, 312, 348, 386, 427, 469, 513, 560, 608, 658, 711, 765, 821, 880, 940, 1002, 1067, 1133, 1201, 1272, 1344, 1418, 1495, 1573, 1653, 1736, 1820, 1906, 1995, 2085, 2177, 2272, 2368, 2466
Offset: 0

Views

Author

Paul Curtz, Sep 24 2015

Keywords

Comments

Companion of A240438 extended from right to left:
..., 21, 13, 7, 2, 0, 0, 1, 5, 11, 18, ...
..., -8, -6, -5, -2, 0, 1, 4, 6, 7, 10, ... see A047267 and A047234
..., 2, 1, 3, 2, 1, 3, 2, 1, 3, 2, ... .
The last digit of a(n) is of period 30. Like A240438.
Is there a definition equivalent to the NAME of A240438?

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 2, 7, 13, 21}, 101] (* Ray Chandler, Sep 24 2015 *)
    RecurrenceTable[{a[n+3] == a[n] + 6 n + 13, a[0]==0, a[1]==2, a[2]==7}, a, {n, 0, 500}] (* G. C. Greubel, Sep 28 2015 *)
    Table[n (n + 1) + Floor[(n + 1)/3], {n, 0, 50}] (* Bruno Berselli, Jun 06 2017 *)
  • PARI
    concat(0, Vec(-x*(x+1)*(x+2)/ ((x-1)^3*(x^2+x+1)) + O(x^100))) \\ Colin Barker, Sep 25 2015
    
  • PARI
    A262523(n)=(2+[9,3]*n=divrem(n,6))*4*n[1]+[0,2,7,13,21,32][n[2]+1] \\ M. F. Hasler, Jun 06 2017

Formula

a(n) = A000290(n+1) - A004523(n+2).
a(n) = A240438(n+1) + A004523(n+1).
a(n) = A240438(n) + A047395(n+1).
a(n+2) - 2*a(n+1) + a(n) = period 3: repeat (3, 1, 2).
a(n+3) = a(n-3) + 4*(2 + 3*n). [Thus, a(n+3m) = a(n-3m) + 4m*(2 + 3n), and a(6m+k) = 4m*(9m + 3k + 2) + a(k): explicit formula for a(n) in terms of a(k), 0 <= k <= 5. - M. F. Hasler, Jun 06 2017]
O.g.f.: -x*(x+1)*(x+2) / ((x-1)^3*(x^2+x+1)). - Colin Barker, Sep 25 2015
E.g.f.: (x/3)*(3*x+7)*exp(x) - (2/(3*sqrt(3)))*exp(-x/2)*sin((sqrt(3)*x)/2). - G. C. Greubel, Sep 28 2015
(a(n+3) - a(n)) mod 2 = 1; (a(n+6) - a(n)) mod 2 = 0. - Altug Alkan, Sep 28 2015
(a(n) mod 2) = (0, 0, 1, 1, 1, 0) repeated. (a(n) mod 3) = (0, 2, 1, 1, 0, 2, 2, 1, 0) repeated. (a(n) mod 4) = (0, 2, 3, 1, 1, 0) repeated. (a(n) mod m) has a period of length 3*m, but for m = 4, 8, 12, ... also of length 3*m/2. - M. F. Hasler, Jun 06 2017
a(n) = n*(n+1) + floor((n+1)/3). - Bruno Berselli, Jun 06 2017

A236535 a(n)*Pi is the total length of irregular spiral (center points: 2, 3, 1; pattern 1) after n rotations.

Original entry on oeis.org

2, 5, 8, 10, 13, 16, 18, 21, 24, 26, 29, 32, 34, 37, 40, 42, 45, 48, 50, 53, 56, 58, 61, 64, 66, 69, 72, 74, 77, 80, 82, 85, 88, 90, 93, 96, 98, 101, 104, 106, 109, 112, 114, 117, 120, 122, 125, 128, 130, 133, 136, 138, 141, 144, 146, 149, 152, 154, 157, 160, 162, 165, 168, 170, 173, 176, 178, 181, 184, 186, 189
Offset: 1

Views

Author

Kival Ngaokrajang, Jan 28 2014

Keywords

Comments

Let points 2, 3, & 1 be placed on a straight line at intervals of 1 unit. At point 1 make a half unit circle then at point 2 make another half circle; by selecting radius point on the left hand side of point 1 (pattern 1); at point 3 make another half circle and maintain continuity of circumferences. Continue using this procedure at point 1, 2, 3, ... and so on.
Conjecture: All forms of 3 center points are non-expanded loops.
There are other sets of center points that give the same sequence, e.g.: [2,3,1,4]; [3,2,4,1]; [3,2,4,1,5]; [2,3,1,4,5,7,6]; [2,3,1,7,4,6,5]; [3,4,2,5,1,6,7]; [4,3,5,6,2,7,1]; [4,5,3,2,1,6,7]; [5,4,6,3,2,7,1].
Also, there are some similar patterns that give difference sequences, e.g.:
A047622: [1,2,7,3,4,6,5]; [1,2,7,6,3,5,4]...
A047399: [1,2,7,3,6,4,5]; [1,2,7,6,5,3,4]...
A047395: [2,3,1,4 7,5,6]; [2,3,1,7,6,4,5]...
A047464: [4,5,3,6,2,7,1]; [1,8,2,7,3,6,4,5];
[9,1,8,2,7,3,6,4,5].
See illustration in links.
Appears to be basically a duplicate of A047618. - R. J. Mathar, Feb 03 2014

Crossrefs

Cf. A014105 (2 center points); A234902, A234903, A234904 (3 center points); A235088, A235089 (4 center points); A236326, A236327 (5 center points).

Formula

Conjecture from Colin Barker, Jul 12 2014: (Start)
a(n) = a(n-1)+a(n-3)-a(n-4).
G.f.: x*(3*x^2+3*x+2) / ((x-1)^2*(x^2+x+1)). (End)

A329583 Numerators of 1 + n^2/4 + period 3: repeat [-1, 1, 1].

Original entry on oeis.org

0, 6, 3, 12, 6, 30, 9, 54, 18, 84, 27, 126, 36, 174, 51, 228, 66, 294, 81, 366, 102, 444, 123, 534, 144, 630, 171, 732, 198, 846, 225, 966, 258, 1092, 291, 1230, 324, 1374, 363, 1524, 402, 1686, 441, 1854, 486, 2028, 531, 2214, 576, 2406, 627
Offset: 0

Views

Author

Paul Curtz, Nov 17 2019

Keywords

Comments

First bisection is 3*A008810.

Crossrefs

Programs

  • Mathematica
    MapIndexed[#1 - 2 Boole[Mod[First@ #2, 3] == 1] + 1 &, CoefficientList[Series[(1 + 5 x - x^2 - 2 x^3 + 2 x^4 + 5 x^5)/(1 - x^2)^3, {x, 0, 44}], x]] (* Michael De Vlieger, Nov 18 2019 *)
  • PARI
    concat(0, Vec(3*x*(2 + 3*x + x^2 - 2*x^3 + x^4 + 3*x^5 + 2*x^6) / ((1 - x)^3*(1 + x)^3*(1 + x + x^2)) + O(x^40))) \\ Colin Barker, Nov 24 2019

Formula

a(n) = A261327(n) + A131561(n+2) = (n^2 + 4)*(5 - 3*(-1)^n)/8 + (-1)^((n+1) mod 3).
From Colin Barker, Nov 24 2019: (Start)
G.f.: 3*x*(2 + 3*x + x^2 - 2*x^3 + x^4 + 3*x^5 + 2*x^6) / ((1 - x)^3*(1 + x)^3*(1 + x + x^2)).
a(n) = -a(n-1) + 2*a(n-2) + 3*a(n-3) - 3*a(n-5) - 2*a(n-6) + a(n-7) + a(n-8) for n>8. (End)

Extensions

Incorrect 129 replaced with 123 by Colin Barker, Nov 24 2019
Showing 1-7 of 7 results.