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 31-40 of 43 results. Next

A223083 Trajectory of 64 under the map n-> A006369(n).

Original entry on oeis.org

64, 85, 113, 151, 201, 134, 179, 239, 319, 425, 567, 378, 252, 168, 112, 149, 199, 265, 353, 471, 314, 419, 559, 745, 993, 662, 883, 1177, 1569, 1046, 1395, 930, 620, 827, 1103, 1471, 1961, 2615, 3487, 4649, 6199, 8265, 5510, 7347, 4898, 6531, 4354, 5805
Offset: 1

Views

Author

N. J. A. Sloane, Mar 22 2013

Keywords

Comments

It is conjectured that this trajectory does not close on itself.

Crossrefs

Programs

  • Maple
    f:=proc(N) if N mod 3 = 0 then 2*(N/3); elif N mod 3 = 2 then 4*((N+1)/3)-1; else 4*((N+2)/3)-3; fi; end;
    t1:=[64];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {64}; While[n = t[[-1]]; s = Switch[Mod[n, 3], 0, 2*n/3, 1, (4*n - 1)/3, 2, (4*n + 1)/3]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> Switch[Mod[n, 3], 0, 2n/3, 1, (4n - 1)/3, , (4n + 1)/3]}, {64}, 60] // Flatten (* _Jean-François Alcover, Mar 01 2019 *)

A265667 Permutation of nonnegative integers: a(n) = n + floor(n/3)*(-1)^(n mod 3).

Original entry on oeis.org

0, 1, 2, 4, 3, 6, 8, 5, 10, 12, 7, 14, 16, 9, 18, 20, 11, 22, 24, 13, 26, 28, 15, 30, 32, 17, 34, 36, 19, 38, 40, 21, 42, 44, 23, 46, 48, 25, 50, 52, 27, 54, 56, 29, 58, 60, 31, 62, 64, 33, 66, 68, 35, 70, 72, 37, 74, 76, 39, 78, 80, 41, 82, 84, 43, 86, 88, 45
Offset: 0

Views

Author

Bruno Berselli, Dec 12 2015 - based on an idea by Paul Curtz

Keywords

Comments

The inverse permutation is given by P(n) = A006368(n-1) + 1, for n >= 1, and P(0) = 0. - Wolfdieter Lang, Sep 21 2021
This permutation is given by A006369(n-1) + 1, with A006369(-1) = -1. Observed by Kevin Ryde. - Wolfdieter Lang, Sep 22 2021

Examples

			-------------------------------------------------------------------------
0, 1, 2, 3,  4, 5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, ...
+  +  +  +   +  +  +   +   +   +   +   +   +   +   +   +   +   +   +
0, 0, 0, 1, -1, 1, 2, -2,  2,  3, -3,  3,  4, -4,  4,  5, -5,  5,  6, ...
-------------------------------------------------------------------------
0, 1, 2, 4,  3, 6, 8,  5, 10, 12,  7, 14, 16,  9, 18, 20, 11, 22, 24, ...
-------------------------------------------------------------------------
		

Crossrefs

Cf. A064455: n+floor(n/2)*(-1)^(n mod 2).
Cf. A265888: n+floor(n/4)*(-1)^(n mod 4).
Cf. A265734: n+floor(n/5)*(-1)^(n mod 5).

Programs

  • Magma
    [n+Floor(n/3)*(-1)^(n mod 3): n in [0..70]];
  • Mathematica
    Table[n + Floor[n/3] (-1)^Mod[n, 3], {n, 0, 70}]
  • Sage
    [n+floor(n/3)*(-1)^mod(n,3) for n in (0..70)]
    

Formula

G.f.: x*(1 + 2*x + 4*x^2 + x^3 + 2*x^4) / ((1 - x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6).
a(3*k) = 4*k;
a(3*k+1) = 2*k+1, hence a(3*k+1) = a(3*k)/2 + 1;
a(3*k+2) = 4*k+2, hence a(3*k+2) = 2*a(3*k+1) = a(3*k) + 2.
Sum_{i=0..n} a(i) = A008738(A032793(n+1)).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 + log(2)/4. - Amiram Eldar, Mar 30 2023

A131743 Period 4: repeat [0, 1, 0, 2].

Original entry on oeis.org

0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 2, 0
Offset: 0

Views

Author

Paul Curtz, Sep 20 2007

Keywords

Comments

Least positive integer k such that n^k == 1 (mod 4), or 0 if GCD(n,4) > 1. - Bruno Berselli, Mar 22 2016

Crossrefs

Cf. A006368.

Programs

Formula

G.f.: x*(1+2*x^2)/ ((1-x)*(x+1)*(x^2+1)). - R. J. Mathar, Nov 15 2007
a(n) = 3/4-1/2*sin(1/2*Pi*n)+3/4*(-1)^(1+n). - R. J. Mathar, Nov 15 2007
a(n) = Fibonacci(2*n) mod 3. - Gary Detlefs Feb 13 2011
a(n) == A006368(n) (mod 3). - Philippe Deléham, Oct 24 2011
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016

A168222 a(n) = A006369(A006369(n)).

Original entry on oeis.org

0, 1, 2, 3, 7, 9, 5, 6, 15, 4, 17, 10, 11, 23, 25, 13, 14, 31, 8, 33, 18, 19, 39, 41, 21, 22, 47, 12, 49, 26, 27, 55, 57, 29, 30, 63, 16, 65, 34, 35, 71, 73, 37, 38, 79, 20, 81, 42, 43, 87, 89, 45, 46, 95, 24, 97, 50, 51, 103, 105, 53, 54, 111, 28, 113, 58, 59, 119, 121, 61, 62
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 20 2009

Keywords

Comments

Inverse integer permutation to A168221;
a(A006368(n)) = A006369(n).

Programs

  • Mathematica
    Table[Nest[If[Divisible[#,3],2#/3,Round[4#/3]]&,n,2],{n,0,100}] (* Paolo Xausa, Dec 15 2023 *)

Formula

Conjectures from Colin Barker, Aug 15 2019: (Start)
G.f.: x*(1 + 2*x + 3*x^2 + 7*x^3 + 9*x^4 + 5*x^5 + 6*x^6 + 15*x^7 + 4*x^8 + 15*x^9 + 6*x^10 + 5*x^11 + 9*x^12 + 7*x^13 + 3*x^14 + 2*x^15 + x^16) / ((1 - x)^2*(1 + x + x^2)^2*(1 + x^3 + x^6)^2).
a(n) = 2*a(n-9) - a(n-18) for n>17.
(End)

A349378 a(n) = A349376(n) + A349377(n).

Original entry on oeis.org

2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, -6, 0, 0, 0, 10, 9, 0, 0, -8, 0, -30, 0, -4, 0, 0, 24, 27, 0, 0, 0, 34, 0, -40, 0, -14, -6, 0, 0, -34, 16, -66, 0, -14, 0, 10, 42, 44, 0, 0, 0, 166, 0, 0, -8, 11, 42, -70, 0, -20, 0, -172, 0, -70, 0, 0, -42, -22, 56, -70, 0, -103, 1, 0, 0, 216, 60, 0, 0, 78
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Crossrefs

Programs

Formula

a(1) = 2, and for n >1, a(n) = -Sum_{d|n, 1A349376(d) * A349377(n/d). [As the sequences are Dirichlet inverses of each other]

A178414 Least odd number in the Collatz (3x+1) preimage of odd numbers not a multiple of 3.

Original entry on oeis.org

1, 3, 9, 7, 17, 11, 25, 15, 33, 19, 41, 23, 49, 27, 57, 31, 65, 35, 73, 39, 81, 43, 89, 47, 97, 51, 105, 55, 113, 59, 121, 63, 129, 67, 137, 71, 145, 75, 153, 79, 161, 83, 169, 87, 177, 91, 185, 95, 193, 99, 201, 103, 209, 107, 217, 111, 225, 115, 233, 119, 241, 123, 249
Offset: 1

Views

Author

T. D. Noe, May 28 2010

Keywords

Comments

The odd non-multiples of 3 are 1, 5, 7, 11,... (A007310). The odd multiples of 3 have no odd numbers their Collatz pre-image. The next odd number in the Collatz iteration of a(2n) is 6n-1. The next odd number in the Collatz iteration of a(2n+1) is 6n+1. For each non-multiple of 3, there are an infinite number of odd numbers in its Collatz pre-image. For example:
Odd pre-images of 1: 1, 5, 21, 85, 341,... (A002450)
Odd pre-images of 5: 3, 13, 53, 213, 853,... (A072197)
Odd pre-images of 7: 9, 37, 149, 597, 2389,...
Odd pre-images of 11: 7, 29, 117, 469, 1877,...(A072261)
In each case, the pre-image sequence is t(k+1) = 4*t(k) + 1 with t(0)=a(n). The array of pre-images is in A178415.
a(n) = A047529(P(n)), with the permutation P(n) = A006368(n-1) + 1, for n >= 1. This shows that this sequence gives the numbers {1, 3, 7} (mod 8) uniquely. - Wolfdieter Lang, Sep 21 2021

Crossrefs

Programs

  • Mathematica
    Riffle[1+8*Range[0,50], 3+4*Range[0,50]]

Formula

a(n) = (n - 1)*(3 - (-1)^n) + 1. [Bogart B. Strauss, Sep 20 2013, adapted to the offset by Matthew House, Feb 14 2017]
From Matthew House, Feb 14 2017: (Start)
G.f.: x*(1 + 3*x + 7*x^2 + x^3)/((1 - x)^2*(1 + x)^2).
a(n) = 2*a(n-2) - a(n-4). (End)
From Philippe Deléham, Nov 06 2023: (Start)
a(2*n) = 4*n-1, a(2*n+1) = 8*n+1.
a(n) = 2*A022998(n-1)+1.
a(n) = 2*A114752(n)-1. (End)

A006373 Numbers of terms in expressions for coefficients of Euler-Lagrange tensors in terms of Riemann-Christoffel curvature tensor and two of its contractions (viz., the Ricci curvature tensor and the Riemann curvature scalar) for n-dimensional differentiable manifolds having a general linear connection.

Original entry on oeis.org

1, 2, 7, 26, 115, 596
Offset: 0

Views

Author

C. C. Briggs (ccb104(AT)vm.cac.psu.edu)

Keywords

Comments

The six known terms of this sequence coincide with the first six terms of A167551. - Johannes W. Meijer, Nov 12 2009

Crossrefs

A330530 Lexicographically earliest sequence of distinct positive integers such that the product of two consecutive terms is always divisible by 4.

Original entry on oeis.org

1, 4, 2, 6, 8, 3, 12, 5, 16, 7, 20, 9, 24, 10, 14, 18, 22, 26, 28, 11, 32, 13, 36, 15, 40, 17, 44, 19, 48, 21, 52, 23, 56, 25, 60, 27, 64, 29, 68, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 72, 31, 76, 33, 80, 35, 84, 37, 88, 39, 92, 41, 96, 43, 100, 45, 104
Offset: 1

Views

Author

Rémy Sigrist, Dec 17 2019

Keywords

Comments

For any k > 0, let f_k be the lexicographically earliest sequence of distinct positive integers such that the product of two consecutive terms is always divisible by k:
- in particular:
f_1 = f_2 = A000027,
f_3 = A006368,
f_4 = a (this sequence),
f_6 = A330531,
- f_k is a permutation of the natural numbers,
- f_k(1) = 1, f_k(2) = max(2, k),
- if k is prime, then f_k corresponds to the integers that are not multiple of k interspersed with the integers that are multiple of k.
Apparently:
- for m > 0, the m-th run of consecutive terms such that gcd(a(n), 4) = 2 has A153893(m+1) terms,
- for m > 1, the m-th run of consecutive terms such that gcd(a(n), 4) = 1 or 4 has A068156(m+1) terms.

Examples

			The first terms, alongside their product with the next term, are:
  n   a(n)  a(n)*a(n+1)
  --  ----  -----------
   1     1            4
   2     4            8
   3     2           12
   4     6           48
   5     8           24
   6     3           36
   7    12           60
   8     5           80
   9    16          112
  10     7          140
		

Crossrefs

Cf. A006368, A068156, A153893, A330531 (f_6), A330576 (inverse).

Programs

  • PARI
    s=0; v=1; for (n=1, 10 000, print (n " " v); s+=2^v; for (w=1, oo, if (!bittest(s,w) && (v*w)%4==0, v=w; break)))

A342131 a(n) = n/2 + floor(n/4) if n is even, otherwise (3*n+1)/2.

Original entry on oeis.org

0, 2, 1, 5, 3, 8, 4, 11, 6, 14, 7, 17, 9, 20, 10, 23, 12, 26, 13, 29, 15, 32, 16, 35, 18, 38, 19, 41, 21, 44, 22, 47, 24, 50, 25, 53, 27, 56, 28, 59, 30, 62, 31, 65, 33, 68, 34, 71, 36, 74, 37, 77, 39, 80, 40, 83, 42, 86, 43, 89, 45, 92, 46, 95, 48, 98, 49, 101, 51, 104
Offset: 0

Views

Author

Thomas Scheuerle, Mar 01 2021

Keywords

Comments

A permutation of the nonnegative integers related to the Collatz function (A014682).
Interspersion of A032766 and A016789. - Michel Marcus, Mar 04 2021

Crossrefs

Programs

  • MATLAB
    function [a] = A342131(max_n)
        for n = 1:max_n
            m = n-1;
            if floor(m/2) == m/2
                a(n) = (m/2)+floor(m/4);
            else
                a(n) = (m*3+1)/2;
            end
        end
    end
    
  • Magma
    &cat [[3*k,6*k+2,3*k+1,6*k+5]: k in [0..20]] // Bruno Berselli, Mar 05 2021
    
  • Mathematica
    a[n_] := If[EvenQ[n], n/2 + Floor[n/4], (3*n + 1)/2]; Array[a, 100, 0] (* Amiram Eldar, Mar 03 2021 *)
    Table[(12 n + 4 - (3 n + 3 - (-1)^(n/2)) (1 + (-1)^n))/8, {n, 0, 70}] (* Bruno Berselli, Mar 05 2021 *)
  • PARI
    a(n) = if (n%2, (3*n+1)/2, n/2 + n\4); \\ Michel Marcus, Mar 04 2021
    
  • Python
    def A342131(n): return (3*n+1)//2 if n % 2 else n//2+n//4 # Chai Wah Wu, Mar 05 2021

Formula

a(n) = 9*n - 2*a(n-1) - 2*a(n-2) - 2*a(n-3) - a(n-4) - 17 for n >= 4.
a(n) = a(n-2) + a(n-4) - a(n-6).
a(n) = A006368(n+1) - 1.
G.f.: (x^4+2*x^3+3*x^2+x+2)*x/((x^2+1)*(x-1)^2*(x+1)^2). - Alois P. Heinz, Mar 01 2021
E.g.f.: (cos(x) + (6*x - 1)*cosh(x) + (2 + 3*x)*sinh(x))/4. - Stefano Spezia, Mar 02 2021
From Bruno Berselli, Mar 05 2021: (Start)
a(n) = (12*n + 4 - (3*n + 3 - (-1)^(n/2))*(1 + (-1)^n))/8. Therefore:
a(4*k) = 3*k;
a(4*k+1) = 6*k + 2;
a(4*k+2) = 3*k + 1;
a(4*k+3) = 6*k + 5. (End)

A223084 Trajectory of 80 under the map n-> A006369(n).

Original entry on oeis.org

80, 107, 143, 191, 255, 170, 227, 303, 202, 269, 359, 479, 639, 426, 284, 379, 505, 673, 897, 598, 797, 1063, 1417, 1889, 2519, 3359, 4479, 2986, 3981, 2654, 3539, 4719, 3146, 4195, 5593, 7457, 9943, 13257, 8838, 5892, 3928, 5237, 6983, 9311, 12415, 16553, 22071
Offset: 1

Views

Author

N. J. A. Sloane, Mar 22 2013

Keywords

Comments

It is conjectured that this trajectory does not close on itself.

Crossrefs

Programs

  • Maple
    f:=proc(N) if N mod 3 = 0 then 2*(N/3); elif N mod 3 = 2 then 4*((N+1)/3)-1; else 4*((N+2)/3)-3; fi; end;
    t1:=[80];
    for n from 1 to 100 do t1:=[op(t1),f(t1[nops(t1)])]; od:
    t1;
  • Mathematica
    t = {80}; While[n = t[[-1]]; s = Switch[Mod[n, 3], 0, 2*n/3, 1, (4*n - 1)/3, 2, (4*n + 1)/3]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> Switch[Mod[n, 3], 0, 2n/3, 1, (4n - 1)/3, , (4n + 1)/3]}, {80}, 60] // Flatten (* _Jean-François Alcover, Mar 01 2019 *)
Previous Showing 31-40 of 43 results. Next