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.
%I A268674 #20 Mar 14 2016 09:39:31 %S A268674 1,1,2,1,3,2,5,1,4,3,7,2,11,5,6,1,13,4,17,3,8,7,19,2,9,11,10,5,23,6, %T A268674 29,1,12,13,15,4,31,17,14,3,37,8,41,7,16,19,43,2,25,9,18,11,47,10,21, %U A268674 5,20,23,53,6,59,29,22,1,27,12,61,13,24,15,67,4,71,31,26,17,35,14,73,3,28,37,79,8,33,41,30,7 %N A268674 a(1) = 1, after which, for odd numbers: a(n) = A078898(n)-th number k for which A055396(k) = A055396(n)-1, and for even numbers: a(n) = a(A000265(n)). %C A268674 For odd numbers n > 1, a(n) tells which term is on the immediately preceding row of A083221, in the same column where n itself is. %C A268674 The sequence offers a left inverse for A250469 that is slightly easier to compute than A250470. %H A268674 Antti Karttunen, <a href="/A268674/b268674.txt">Table of n, a(n) for n = 1..32769</a> %H A268674 <a href="/index/Si#sieve">Index entries for sequences generated by sieves</a> %F A268674 a(1) = 1, after which, a(n) = a(A000265(n)) if n is even, otherwise for odd n, a(n) = A083221(A055396(n)-1, A078898(n)). %F A268674 Other identities. For all n >= 1: %F A268674 a(A250469(n)) = n. [This works as a left inverse for sequence A250469.] %F A268674 a(2n) = a(n). [The even bisection gives the whole sequence back.] %F A268674 a(2n-1) = A250470(2n-1). [Matches with A250470 on odd numbers.] %F A268674 a(A000040(n+1)) = A000040(n). [Maps each odd prime to the preceding prime.] %F A268674 a(A001248(n+1)) = A001248(n). [Maps each square of an odd prime to the square of the preceding prime.] %t A268674 (* b = A250469 *) b[1] = 1; b[n_] := If[PrimeQ[n], NextPrime[n], m1 = p1 = FactorInteger[n][[1, 1]]; For[ k1 = 1, m1 <= n, m1 += p1; If[m1 == n, Break[]]; If[ FactorInteger[m1][[1, 1]] == p1, k1++]]; m2 = p2 = NextPrime[p1]; For[k2 = 1, True, m2 += p2, If[ FactorInteger[m2][[1, 1]] == p2, k2++]; If[k1 + 2 == k2, Return[m2]]]]; %t A268674 a[1] = a[2] = 1; a[n_?EvenQ] := a[n] = a[n/2]; a[n_] := a[n] = For[k = 1, True, k++, If[b[k] == n, Return[k]]]; %t A268674 Array[a, 100] (* _Jean-François Alcover_, Mar 14 2016 *) %o A268674 (Scheme, with memoization-macro definec) %o A268674 (definec (A268674 n) (cond ((= 1 n) n) ((even? n) (A268674 (A000265 n))) (else (A083221bi (- (A055396 n) 1) (A078898 n))))) ;; Where A083221bi implements A083221 as a dyadic function. %Y A268674 Left inverse of A250469. %Y A268674 Cf. A000040, A000265, A001248, A055396, A078898, A083221. %Y A268674 Cf. also A064989. %Y A268674 Differs from A250470 for the first time at n=42, where a(42)=8, while A250470(42) = 10. %K A268674 nonn %O A268674 1,3 %A A268674 _Antti Karttunen_, Feb 11 2016