This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A246277 Column index of n in A246278: a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)). 57
 0, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 5, 11, 1, 12, 2, 13, 4, 14, 1, 15, 1, 16, 7, 17, 3, 18, 1, 19, 11, 20, 1, 21, 1, 22, 6, 23, 1, 24, 2, 25, 13, 26, 1, 27, 5, 28, 17, 29, 1, 30, 1, 31, 10, 32, 7, 33, 1, 34, 19, 35, 1, 36, 1, 37, 9, 38, 3, 39, 1, 40, 8, 41, 1, 42 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 COMMENTS If n >= 2, n occurs in column a(n) of A246278. By convention, a(1) = 0 because 1 does not occur in A246278. LINKS Antti Karttunen, Table of n, a(n) for n = 1..10000 FORMULA a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)) = a(A064216(n+1)). [Cf. the formula for A252463.] Other identities. For all n >= 1, the following holds: a(A000040(n)) = 1. For all w >= 0, a(p_{i} * p_{j} * ... * p_{k}) = a(p_{i+w} * p_{j+w} * ... * p_{k+w}). [Follows directly from the definition.] For all n >= 2, A001222(a(n)) = A001222(n)-1. [a(n) has one less prime factor than n. Thus each semiprime (A001358) is mapped to some prime (A000040), etc.] For all n >= 2, a(n) = A078898(A249817(n)). For semiprimes n = p_i * p_j, j >= i, a(n) = A000040(1+A243055(n)) = p_{1+j-i}. MATHEMATICA a246277[n_Integer] := Module[{f, p, a064989, a},   f[x_] := Transpose@FactorInteger[x];   p[x_] := Which[     x == 1, 1,     x == 2, 1,     True, NextPrime[x, -1]];   a064989[x_] := Times @@ Power[p /@ First[f[x]], Last[f[x]]];   a[1] = 0;   a[x_] := If[EvenQ[x], x/2, NestWhile[a064989, x, OddQ]/2]; a/@Range[n]]; a246277[84] (* Michael De Vlieger, Dec 19 2014 *) PROG (PARI) A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)}; A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); }; for(n=1, 10000, write("b246277.txt", n, " ", A246277(n))); (Scheme, two different variants, the second one employing memoizing definec-macro) (define (A246277 n) (if (= 1 n) 0 (let loop ((n n)) (if (even? n) (/ n 2) (loop (A064989 n)))))) (definec (A246277 n) (cond ((= 1 n) 0) ((even? n) (/ n 2)) (else (A246277 (A064989 n))))) (Python) from sympy import factorint, prevprime from operator import mul def a064989(n):     f=factorint(n)     return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f]) def a(n): return 0 if n==1 else n/2 if n%2==0 else a(a064989(n)) print [a(n) for n in xrange(1, 101)] # Indranil Ghosh, Jun 15 2017 CROSSREFS Cf. A078898 (has the same role with array A083221 as this sequence has with A246278). Cf. A000040, A001222, A001358, A055396, A064989, A064216, A243055, A246272, A249810, A249820, A249735, A252463. This sequence is also used in the definition of the following permutations: A246274, A246276, A246675, A246677, A246683, A249815, A249817 (A249818), A249823, A249825, A250244, A250245, A250247, A250249. Also in the definition of arrays A249821, A251721, A251722. Sequence in context: A325352 A305438 A078898 * A260739 A130747 A055440 Adjacent sequences:  A246274 A246275 A246276 * A246278 A246279 A246280 KEYWORD nonn AUTHOR Antti Karttunen, Aug 21 2014 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.

Last modified August 23 01:10 EDT 2019. Contains 326211 sequences. (Running on oeis4.)