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

A168221 a(n) = A006368(A006368(n)).

Original entry on oeis.org

0, 1, 2, 3, 9, 6, 7, 4, 18, 5, 11, 12, 27, 15, 16, 8, 36, 10, 20, 21, 45, 24, 25, 13, 54, 14, 29, 30, 63, 33, 34, 17, 72, 19, 38, 39, 81, 42, 43, 22, 90, 23, 47, 48, 99, 51, 52, 26, 108, 28, 56, 57, 117, 60, 61, 31, 126, 32, 65, 66, 135, 69, 70, 35, 144, 37, 74, 75, 153, 78, 79, 40
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 20 2009

Keywords

Comments

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

Crossrefs

Programs

  • Mathematica
    Table[Nest[If[OddQ[#],Floor[(3#+2)/4],3#/2]&,n,2],{n,0,100}] (* Paolo Xausa, Dec 15 2023 *)
    LinearRecurrence[{0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,-1},{0,1,2,3,9,6,7,4,18,5,11,12,27,15,16,8,36,10,20,21,45,24,25,13},80] (* Harvey P. Dale, Feb 07 2024 *)
  • Python
    def A006368(n):
        if n%2 == 0:
            return 3*(n//2)
        elif n%4 == 1:
            return 3*(n//4)+1
        else:
            return 3*(n+1)//4-1
    n = 0
    while n < 30:
        print(n,A006368(A006368(n)))
        n = n+1 # A.H.M. Smeets, Aug 14 2019

Formula

From Luce ETIENNE, Aug 14 2019: (Start)
a(n) = 2*a(n-16) - a(n-32).
a(n) = (-18*(40*m^7 - 973*m^6 + 9352*m^5 - 45115*m^4 + 114520*m^3 - 145432*m^2 + 75168*m - 10080)*floor(n/8) - m*(332*m^6 - 7973*m^5 + 75236*m^4 - 352835*m^3 + 855008*m^2 - 999992*m + 422664) + m*(4*m^6 - 105*m^5 + 1120*m^4 - 6195*m^3 + 18676*m^2 - 28980*m + 18000)*(-1)^(n/8))/10080 where m = n mod 8.
(End)
From A.H.M. Smeets, Aug 14 2019: (Start)
a(4*n) = 9*n.
a(8*n+1) = a(8*n-1)+1, n > 0.
a(8*n+3) = a(8*n+2)+1.
a(8*n+5) = a(8*n+3)+3 = a(8*n+2)+4.
a(8*n+6) = a(8*n+5)+1 = a(8*n+3)+4 = a(8*n+2)+5.
a(16*n+1) = 9*n+1.
a(16*n+2) = 18*n+2.
a(16*n+3) = a(16*n+2)+1 = 18*n+3.
a(16*n+5) = a(16*n+3)+3 = 18*n+6.
a(16*n+6) = a(16*n+5)+1 = 18*n+7.
a(16*n+7) = (a(16*n+6)+1)/2 = 9*n+4.
a(16*n+9) = 9*n+5.
a(16*n+10) = 2*a(16*n+9)+1 = 18*n+11.
a(16*n+11) = a(16*n+10)+1 = 18*n+12.
a(16*n+13) = a(16*n+11)+3 = 18*n+15.
a(16*n+14) = a(16*n+13) = 18*n+16.
a(16*n+15) = a(16*n+14)/2 = 9*n+8.
From this, (9*n-7)/16 <= a(n) <= 9*n/4.
(End)
From Colin Barker, Aug 23 2019: (Start)
G.f.: x*(1 - x + x^2)*(1 + 3*x + 5*x^2 + 11*x^3 + 12*x^4 + 8*x^5 + 10*x^7 + 14*x^8 + 13*x^9 + 8*x^10 + 13*x^11 + 14*x^12 + 10*x^13 + 8*x^15 + 12*x^16 + 11*x^17 + 5*x^18 + 3*x^19 + x^20) / ((1 - x)^2*(1 + x)^2*(1 + x^2)^2*(1 + x^4)^2*(1 + x^8)).
a(n) = a(n-8) + a(n-16) - a(n-24) for n>23.
(End)

A168223 a(n) = A006369(n) - A006368(n).

Original entry on oeis.org

0, 0, 0, 0, -1, 3, -5, 4, -1, -1, -2, 7, -10, 7, -2, -1, -3, 10, -15, 11, -3, -2, -4, 14, -20, 14, -4, -2, -5, 17, -25, 18, -5, -3, -6, 21, -30, 21, -6, -3, -7, 24, -35, 25, -7, -4, -8, 28, -40, 28, -8, -4, -9, 31, -45, 32, -9, -5, -10, 35, -50, 35, -10, -5, -11, 38, -55, 39
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 20 2009

Keywords

Comments

A047342 and A168223 give record values and where they occur: a(A168224(n))=A047342(n) and a(m) < A047342(n) for m < A168224(n).

Programs

  • Haskell
    a168223 n = a006369 n - a006368 n  -- Reinhard Zumkeller, Mar 15 2014
  • Mathematica
    LinearRecurrence[{-2,-2,0,3,4,3,0,-2,-2,-1},{0, 0, 0, 0, -1, 3, -5, 4, -1, -1},50] (* G. C. Greubel, Jul 16 2016 *)

Formula

a(12*n) = -10*n, a(12*n+1) = 7*n.
a(12*n+2) = -2*n, a(12*n+3) = -n.
a(12*n+4) = -2*n - 1, a(12*n+5) = 7*n + 3.
a(12*n+6) = -10*n - 5, a(12*n+7) = 7*n + 4.
a(12*n+8) = -2*n -1, a(12*n+9) = -n - 1.
a(12*n+10) = -2*n - 2, a(12*n+11) = 7*n + 7.
G.f.: -x^4*(x^2-x+1) / ((x-1)^2*(x+1)^2*(x^2+1)*(x^2+x+1)^2). - Colin Barker, Apr 04 2013

A028398 When map in A006368 is iterated, all numbers fall into cycles; order cycles by smallest entry; a(n) is smallest entry in n-th cycle (some cycles are infinite).

Original entry on oeis.org

0, 1, 2, 4, 8, 14, 40, 44, 64, 80, 82, 104, 136, 172, 184, 188, 242, 256, 274, 280, 296, 352, 368, 382, 386, 424, 472, 496, 526, 530, 608, 622, 638, 640, 652, 670, 688, 692, 712, 716, 752, 760, 782, 784, 800, 814, 824, 832, 860, 878, 904, 910, 932, 964, 980, 1022
Offset: 0

Views

Author

Keywords

Comments

Iterations of A006368 starting with a(3)=4, a(4)=8, a(5)=14 and a(6)=40 give trajectories A180853, A028393, A028395, A182205 respectively. [Reinhard Zumkeller, Apr 18 2012]

References

  • D. Gale, Tracking the Automatic Ant and Other Mathematical Explorations, A Collection of Mathematical Entertainments Columns from The Mathematical Intelligencer, Springer, 1998; see p. 16.

A349351 Dirichlet inverse of A006368, "the amusical permutation", a(2n)=3n, a(4n+1)=3n+1, a(4n-1)=3n-1.

Original entry on oeis.org

1, -3, -2, 3, -4, 3, -5, -3, -3, 9, -8, 6, -10, 9, 5, 3, -13, 15, -14, 0, 4, 15, -17, -15, -3, 21, 0, 9, -22, 9, -23, -3, 7, 27, 14, -24, -28, 27, 11, -9, -31, 27, -32, 12, 18, 33, -35, 24, -12, 15, 14, 6, -40, 9, 23, -27, 13, 45, -44, -63, -46, 45, 27, 3, 31, 39, -50, 9, 16, 9, -53, 6, -55, 57, 12, 18, 22, 33, -59
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Programs

  • PARI
    up_to = 20000;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA006368(n) = ((3*n)+(n%2))\(2+((n%2)*2));
    v349351 = DirInverseCorrect(vector(up_to,n,A006368(n)));
    A349351(n) = v349351[n];

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A006368(n/d) * a(d).
a(n) = A349352(n) - A006368(n).

A349352 Sum of A006368, "the amusical permutation", and its Dirichlet inverse.

Original entry on oeis.org

2, 0, 0, 9, 0, 12, 0, 9, 4, 24, 0, 24, 0, 30, 16, 27, 0, 42, 0, 30, 20, 48, 0, 21, 16, 60, 20, 51, 0, 54, 0, 45, 32, 78, 40, 30, 0, 84, 40, 51, 0, 90, 0, 78, 52, 102, 0, 96, 25, 90, 52, 84, 0, 90, 64, 57, 56, 132, 0, 27, 0, 138, 74, 99, 80, 138, 0, 111, 68, 114, 0, 114, 0, 168, 68, 132, 80, 150, 0, 138, 61, 186, 0
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Comments

The first negative term is a(2520) = -918.

Crossrefs

Programs

  • PARI
    up_to = 20000;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA006368(n) = ((3*n)+(n%2))\(2+((n%2)*2));
    v349351 = DirInverseCorrect(vector(up_to,n,A006368(n)));
    A349351(n) = v349351[n];
    A349352(n) = (A006368(n)+A349351(n));

Formula

a(n) = A006368(n) + A349351(n).
a(1) = 2, and for n > 1, a(n) = -Sum_{d|n, 1A006368(d) * A349351(n/d).

A349369 Sum of A006369 and its Dirichlet inverse, where A006369 is the inverse of "amusical permutation", A006368.

Original entry on oeis.org

2, 0, 0, 9, 0, 12, 0, 3, 4, 42, 0, -10, 0, 54, 28, 37, 0, 16, 0, -41, 36, 90, 0, 60, 49, 102, 16, -39, 0, -84, 0, 11, 60, 138, 126, 30, 0, 150, 68, 221, 0, -92, 0, -81, 40, 186, 0, -72, 81, -61, 92, -79, 0, 36, 210, 259, 100, 234, 0, 394, 0, 246, 56, 149, 238, -172, 0, -121, 124, -352, 0, 8, 0, 294, -22, -119, 270
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Crossrefs

Cf. also A349352, A349378.

Programs

Formula

a(n) = A006369(n) + A349368(n).
a(1) = 2, and for n >1, a(n) = -Sum_{d|n, 1A006369(d) * A349368(n/d).

A368179 Square array read by ascending antidiagonals: row n is the trajectory of n under the A006368 map.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 1, 0, 4, 2, 2, 1, 0, 5, 6, 3, 3, 1, 0, 6, 4, 9, 2, 2, 1, 0, 7, 9, 6, 7, 3, 3, 1, 0, 8, 5, 7, 9, 5, 2, 2, 1, 0, 9, 12, 4, 5, 7, 4, 3, 3, 1, 0, 10, 7, 18, 6, 4, 5, 6, 2, 2, 1, 0, 11, 15, 5, 27, 9, 6, 4, 9, 3, 3, 1, 0, 12, 8, 11, 4, 20, 7, 9, 6, 7, 2, 2, 1, 0
Offset: 0

Views

Author

Paolo Xausa, Dec 15 2023

Keywords

Examples

			Array begins:
  [ 0]   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ... = A000004
  [ 1]   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ... = A000012
  [ 2]   2,  3,  2,  3,  2,  3,  2,  3,  2,  3,  2, ... = A010693
  [ 3]   3,  2,  3,  2,  3,  2,  3,  2,  3,  2,  3, ... = A176059
  [ 4]   4,  6,  9,  7,  5,  4,  6,  9,  7,  5,  4, ... = A180853
  [ 5]   5,  4,  6,  9,  7,  5,  4,  6,  9,  7,  5, ... = A180853 (shifted)
  [ 6]   6,  9,  7,  5,  4,  6,  9,  7,  5,  4,  6, ... = A180853 (shifted)
  [ 7]   7,  5,  4,  6,  9,  7,  5,  4,  6,  9,  7, ... = A180853 (shifted)
  [ 8]   8, 12, 18, 27, 20, 30, 45, 34, 51, 38, 57, ... = A028393
  [ 9]   9,  7,  5,  4,  6,  9,  7,  5,  4,  6,  9, ... = A180853 (shifted)
  [10]  10, 15, 11,  8, 12, 18, 27, 20, 30, 45, 34, ... = A180864 (shifted)
  ...    |   |   |
      A001477|A168221
             |
          A006368
		

Crossrefs

Programs

  • Mathematica
    A006368[n_]:=If[OddQ[n],Floor[(3n+2)/4],3n/2];
    A368179list[dmax_]:=With[{a=Reverse[Table[NestList[A006368,n-1,dmax-n],{n,dmax}]]},Array[Diagonal[a,#]&,dmax,1-dmax]];
    A368179list[15] (* Generates 15 antidiagonals *)

A368180 Main diagonal of A368179: the n-th term in the trajectory of n under the A006368 map.

Original entry on oeis.org

0, 1, 2, 2, 5, 5, 9, 4, 51, 6, 34, 57, 48, 38, 132, 48, 167, 32, 205, 167, 130, 106, 167, 243, 50, 159, 125, 369, 297, 119, 702, 130, 844, 84, 500, 50, 1215, 119, 1424, 142, 840, 312, 126, 3041, 70, 7209, 22143, 540, 1623, 160, 15165, 1443, 8867, 3406, 10509, 1899, 12146, 578, 911, 79
Offset: 0

Views

Author

Paolo Xausa, Dec 15 2023

Keywords

Crossrefs

Programs

  • Mathematica
    A368180[n_]:=Nest[If[OddQ[#],Floor[(3#+2)/4],3#/2]&,n,n];
    Array[A368180,100,0]

Formula

a(n) = A368179(n,n).

A094332 Iterate the map in A006368 starting at 12.

Original entry on oeis.org

12, 8, 11, 15, 10, 13, 17, 23, 31, 41, 55, 73, 97, 129, 86, 115, 153, 102, 68, 91, 121, 161, 215, 287, 383, 511, 681, 454, 605, 807, 538, 717, 478, 637, 849, 566, 755, 1007, 1343, 1791, 1194, 796, 1061, 1415, 1887, 1258, 1677, 1118, 1491, 994, 1325, 1767, 1178, 1571
Offset: 1

Views

Author

N. J. A. Sloane, Jun 04 2004

Keywords

Crossrefs

See A028384, A006368, A094328, etc. for more information.

A223086 Trajectory of 64 under the map n-> A006368(n).

Original entry on oeis.org

64, 96, 144, 216, 324, 486, 729, 547, 410, 615, 461, 346, 519, 389, 292, 438, 657, 493, 370, 555, 416, 624, 936, 1404, 2106, 3159, 2369, 1777, 1333, 1000, 1500, 2250, 3375, 2531, 1898, 2847, 2135, 1601, 1201, 901, 676, 1014, 1521, 1141, 856, 1284, 1926, 2889
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:=n-> if n mod 2 = 0 then 3*n/2 elif n mod 4 = 1 then (3*n+1)/4 else (3*n-1)/4; fi;
    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 = If[EvenQ[n], 3 n/2, Round[3 n/4]]; Length[t] < 100 && ! MemberQ[t, s], AppendTo[t, s]]; t (* T. D. Noe, Mar 22 2013 *)
    SubstitutionSystem[{n_ :> If[EvenQ[n], 3n/2, Round[3n/4]]}, {64}, 100] // Flatten (* Jean-François Alcover, Mar 01 2019 *)
Previous Showing 11-20 of 43 results. Next