login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A168221 a(n) = A006368(A006368(n)). 4
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Inverse integer permutation to A168222;

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

LINKS

A.H.M. Smeets, Table of n, a(n) for n = 0..20000

Index entries for sequences that are permutations of the natural numbers

Index entries for sequences related to 3x+1 (or Collatz) problem

Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,-1).

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)

PROG

(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

CROSSREFS

Cf. A006368, A006369, A168222.

Sequence in context: A011164 A082234 A263256 * A011028 A224519 A288842

Adjacent sequences:  A168218 A168219 A168220 * A168222 A168223 A168224

KEYWORD

nonn,easy

AUTHOR

Reinhard Zumkeller, Nov 20 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 23 11:19 EDT 2019. Contains 328345 sequences. (Running on oeis4.)