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

A342369 If n is congruent to 2 (mod 3), then a(n) = (2*n - 1)/3; otherwise, a(n) = 2*n.

Original entry on oeis.org

0, 2, 1, 6, 8, 3, 12, 14, 5, 18, 20, 7, 24, 26, 9, 30, 32, 11, 36, 38, 13, 42, 44, 15, 48, 50, 17, 54, 56, 19, 60, 62, 21, 66, 68, 23, 72, 74, 25, 78, 80, 27, 84, 86, 29, 90, 92, 31, 96, 98, 33, 102, 104, 35, 108, 110, 37, 114, 116, 39, 120, 122, 41, 126, 128, 43, 132, 134, 45, 138, 140, 47, 144, 146
Offset: 0

Views

Author

Thomas Scheuerle, Mar 09 2021

Keywords

Comments

This sequence is a permutation of all numbers not congruent to 4 (mod 6) (A047256).
This sequence has no finite cycles other than (2,1) under recursion, because of all cycles of permutation A093545(n), only one cycle (2,1) is without any number congruent to 4 (mod 6). See section "formula" first entry here. After a finite number of recursions it will reach only numbers divisible by 3 under further recursion.
m = a(n) is the smallest solution to A014682(m) = n.
If we define f(n) = 2*n and j(n) as an arbitrary recursion into a(n) and/or f(n) ( two examples: j(n) = a(a(n)) or j(n) = a(f(a(n))) ), then for all m, k and n = A014682^k(m), exists a j(n) that allows m = j(n). "^k" means recursion here.
Proving the Collatz conjecture could be done by proving that for all positive integers m, a function j(n) (see first comment) could be designed such that m = j(1). All numbers greater than 4 can be reached by a^k(6*p - 2) with exactly one p and k. The Collatz conjecture cannot be true if 3*p - 1 = a^k(6*p - 2) exists.

Crossrefs

Programs

  • MATLAB
    function a = A342369( max_n )
        a(1) = 0;
        for n=1:max_n
            if mod(n,3) == 2
                a(n) = (2*n - 1)/3;
            else
                a(n) = 2*n;
            end
        end
    end
    
  • Mathematica
    Array[If[Mod[#, 3] == 2, (2 # - 1)/3, 2 #] &, 74, 0] (* Michael De Vlieger, Mar 14 2021 *)
  • PARI
    a(n) = if ((n%3)==2, (2*n - 1)/3, 2*n); \\ Michel Marcus, Mar 09 2021

Formula

a(n) = A093545(n) + floor((1 + A093545(n))/5).
a(3*n) = a(3*(n-1)) + 6.
a(3*n - 1) = a(3*(n-1) - 1) + 2.
a(3*n - 2) = a(3*(n-1) - 2) + 6.
a(n) = 14*n - 2*a(n-1) - 3*a(n-2) - 2*a(n-3) - a(n-4) - 29 for n >= 4.
A014682(a(n)) = n.
a(A014682(n)) = (n+2)/3 - 1 if n == 4 (mod 6).
a(A014682(n)) = n if n !== 4 (mod 6).
a^k(3*n) = (3*n)*2^k where a^2(3*n) is a(a(3*n)) = (3*n)*4.
G.f.: -(-x^5 - 4*x^4 - 6*x^3 - x^2 - 2*x)/(x^6 - 2*x^3 + 1).
a(n) = (A093544(n+1) - 1)/2. - Hugo Pfoertner, Mar 10 2021

A332410 a(n) = 2*a(n-1) - a(n-2) + a(n-5) - 2*a(n-6) + a(n-7) with a(0)=0, a(1)=1, a(2)=3, a(3)=6, a(4)=11, a(5)=17, a(6)=24.

Original entry on oeis.org

0, 1, 3, 6, 11, 17, 24, 32, 41, 52, 64, 77, 91, 106, 123, 141, 160, 180, 201, 224, 248, 273, 299, 326, 355, 385, 416, 448, 481, 516, 552, 589, 627, 666, 707, 749, 792, 836, 881, 928, 976, 1025, 1075, 1126, 1179
Offset: 0

Views

Author

Paul Curtz, Feb 11 2020

Keywords

Comments

This sequence occurs twice as a linear spoke in the hexagonal spiral constructed from A002266:
17 17 17 17 17 18 18
16 11 11 11 11 12 12 18
16 11 6 6 7 7 7 12 18
16 10 6 3 3 3 3 7 12 18
16 10 6 3 1 1 1 4 7 12 19
16 10 6 2 0 0 0 1 4 8 13 19
15 10 5 2 0 0 1 4 8 13 19
15 10 5 2 2 2 4 8 13 19
15 9 5 5 5 4 8 13 19
15 9 9 9 9 8 13 20
15 14 14 14 14 14 20
a(-1-n) = 0, 1, 4, 8, 13, 19, 26, 35, 45, ... also occurs twice in the same spiral.
Difference table:
0, 1, 3, 6, 11, 17, 24, 32, 41, 52, ... = a(n)
1, 2, 3, 5, 6, 7, 8, 9, 11, 12, ... = A047256(n+1)
1, 1, 2, 1, 1, 1, 1, 2, 1, 1, ... = A130782.
There is no linear spoke with three copies in this spiral. Compare with the spiral illustrated in sequence A330707 and constructed from A002265 where the same spokes occur three times: A006578, A001859 and A077043, essentially. Strictly, three times from 1, 1, 1 for A006578, from 2, 2, 2 for A001859 and from 7, 7, 7 for A077043.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2, -1, 0, 0, 1, -2, 1}, {0, 1, 3, 6, 11, 17, 24}, 45] (* Amiram Eldar, Feb 12 2020 *)
  • PARI
    concat(0, Vec(x*(1 + x)*(1 + x^2 + x^3) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)) + O(x^50))) \\ Colin Barker, Feb 11 2020, Apr 24 2020

Formula

a(8+n) - a(8-n) = 20*n.
G.f.: x*(1 + x)*(1 + x^2 + x^3) / ((1 - x)^3*(1 + x + x^2 + x^3 + x^4)). - Colin Barker, Feb 11 2020
Showing 1-2 of 2 results.