login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(1) = 1; for n > 1, a(n) = 3*a(A253889(n)) + (n mod 3).
7

%I #17 Sep 18 2017 09:22:56

%S 1,5,3,16,17,9,49,11,33,160,50,156,52,53,147,88,29,27,82,149,474,457,

%T 35,453,106,101,441,151,482,303,265,152,483,250,470,1449,1441,158,480,

%U 1429,161,1407,469,443,1371,298,266,318,1348,89,969,961,83,954,910,248,897,268,449,1455,322,1424,99,808,1373,738,1366,107

%N a(1) = 1; for n > 1, a(n) = 3*a(A253889(n)) + (n mod 3).

%C a(n) encodes in its base-3 representation the succession of modulo 3 residues obtained when map x -> A253889(x), starting from x=n, is iterated down to the eventual 1.

%H Antti Karttunen, <a href="/A292243/b292243.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(1) = 1; for n > 1, a(n) = 3*a(A253889(n)) + A010872(n).

%t f[n_] := Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1]; g[n_] := (Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n; a[1] = 1; a[n_] := a[n] = 3 a[Floor@ g[Floor[f[n]/2]]] + Mod[n, 3]; Array[a, 68] (* _Michael De Vlieger_, Sep 16 2017 *)

%o (PARI)

%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From _Michel Marcus_

%o A048673(n) = (A003961(n)+1)/2;

%o 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)};

%o A064216(n) = A064989((2*n)-1);

%o A253889(n) = if(1==n,n,A048673(A064216(n)\2));

%o A292243(n) = if(1==n,n,((n%3) + 3*A292243(A253889(n))));

%o (Scheme, with memoization-macro definec)

%o (definec (A292243 n) (if (= 1 n) n (+ (modulo n 3) (* 3 (A292243 (A253889 n))))))

%Y Cf. A010872, A048673, A064216, A253889, A292244, A292245, A292246.

%Y Cf. also A292384.

%K nonn,base

%O 1,2

%A _Antti Karttunen_, Sep 15 2017