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 A260442 #55 Jan 25 2025 13:07:32 %S A260442 1,2,3,5,6,7,11,13,15,17,18,19,23,29,30,31,35,37,41,43,47,53,59,61,67, %T A260442 71,73,75,77,79,83,89,90,97,101,103,105,107,109,113,127,131,137,139, %U A260442 143,149,151,157,163,167,173,179,181,191,193,197,199,210,211,221,223,227,229,233,239,241,245,251,257,263,269,270,271,277,281,283,293,307,311 %N A260442 Sequence A260443 sorted into ascending order. %C A260442 Each term is a prime factorization encoding of one of the Stern polynomials. See A260443 for details. %C A260442 Numbers n for which A260443(A048675(n)) = n. - _Antti Karttunen_, Oct 14 2016 %H A260442 Antti Karttunen, <a href="/A260442/b260442.txt">Table of n, a(n) for n = 0..10000</a> %o A260442 (PARI) %o A260442 allocatemem(2^30); %o A260442 A048675(n) = my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; \\ _Michel Marcus_, Oct 10 2016 %o A260442 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From _Michel Marcus_ %o A260442 A260443(n) = if(n<2, n+1, if(n%2, A260443(n\2)*A260443(n\2+1), A003961(A260443(n\2)))); %o A260442 isA260442(n) = (A260443(A048675(n)) == n); \\ The most naive version. %o A260442 A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])) \\ _Charles R Greathouse IV_, Apr 23 2015 %o A260442 A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1]))); \\ After _M. F. Hasler_'s code for A006530. %o A260442 isA260442(n) = ((1==n) || isprime(n) || ((omega(n) == 1+(A061395(n)-A055396(n))) && (A260443(A048675(n)) == n))); \\ Somewhat optimized. %o A260442 i=0; n=0; while(i < 10001, n++; if(isA260442(n), write("b260442.txt", i, " ", n); i++)); %o A260442 \\ _Antti Karttunen_, Oct 14 2016 %o A260442 (Scheme) %o A260442 ;; With Antti Karttunen's IntSeq-library. %o A260442 (define A260442 (FIXED-POINTS 0 1 (COMPOSE A260443 A048675))) %o A260442 ;; An optimized version: %o A260442 (define A260442 (MATCHING-POS 0 1 (lambda (n) (or (= 1 n) (= 1 (A010051 n)) (and (not (< (A001221 n) (+ 1 (A243055 n)))) (= n (A260443 (A048675 n)))))))) %o A260442 ;; _Antti Karttunen_, Oct 14 2016 %o A260442 (Python) %o A260442 from sympy import factorint, prime, primepi %o A260442 from operator import mul %o A260442 from functools import reduce %o A260442 def a048675(n): %o A260442 F=factorint(n) %o A260442 return 0 if n==1 else sum([F[i]*2**(primepi(i) - 1) for i in F]) %o A260442 def a003961(n): %o A260442 F=factorint(n) %o A260442 return 1 if n==1 else reduce(mul, [prime(primepi(i) + 1)**F[i] for i in F]) %o A260442 def a(n): return n + 1 if n<2 else a003961(a(n//2)) if n%2==0 else a((n - 1)//2)*a((n + 1)//2) %o A260442 print([n for n in range(301) if a(a048675(n))==n]) # _Indranil Ghosh_, Jun 21 2017 %Y A260442 Cf. A003961, A048675, A260443. %Y A260442 Subsequence of A073491. %Y A260442 From 2 onward the positions of nonzeros in A277333. %Y A260442 Various subsequences: A000040, A002110, A070826, A277317, A277200 (even terms). Also all terms of A277318 are included here. %Y A260442 Cf. also A277323, A277324 and permutation pair A277415 & A277416. %K A260442 nonn %O A260442 0,2 %A A260442 _Antti Karttunen_, Jul 29 2015