cp's OEIS Frontend

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.

A102566 a(n) = {minimal k such that f^k(prime(n)) = 1} where f(m) = (m+1)/2^r, 2^r is the highest power of two dividing m+1.

This page as a plain text file.
%I A102566 #28 Dec 10 2023 09:19:46
%S A102566 2,1,2,1,2,2,4,3,2,2,1,4,4,3,2,3,2,2,5,4,5,3,4,4,5,4,3,3,3,4,1,6,6,5,
%T A102566 5,4,4,5,4,4,4,4,2,6,5,4,4,2,4,4,4,2,4,2,8,6,6,5,6,6,5,6,5,4,5,4,5,6,
%U A102566 4,4,6,4,3,4,3,2,6,5,6,5,5,5,3,5,3,3,6,5,4,3,4,2,3,3,3,2,2,8,7,6,7,6,6,6,5
%N A102566 a(n) = {minimal k such that f^k(prime(n)) = 1} where f(m) = (m+1)/2^r, 2^r is the highest power of two dividing m+1.
%C A102566 A066195(n+1) is the prime corresponding to the first n in this sequence. - _David Wasserman_, Apr 08 2008
%F A102566 a(n) = A023416(prime(n)) + 1. - _David Wasserman_, Apr 08 2008
%F A102566 a(n) = A035103(n) + 1. - _Filip Zaludek_, Nov 19 2016
%e A102566 f(f(f(f(17)))) = 1, prime(7) = 17, so a(7) = 4.
%e A102566 prime(16) = 53 = (2*27-1) = (2*(2^2*7-1)-1) = (2*(2^2*(2^3*1-1)-1)-1), has 3 levels, so a(16) = 3.
%o A102566 (PARI) f(n) = (n+1)/2^(valuation(n+1, 2));
%o A102566 a(n) = {my(k = 1, p = prime(n)); while((q=f(p)) != 1, k++; p = q); k;} \\ _Michel Marcus_, Nov 20 2016
%o A102566 (PARI) a(n) = my(p=prime(n)); 2 + logint(p, 2) - hammingweight(p); \\ _Kevin Ryde_, Nov 06 2023
%Y A102566 Cf. A023416, A035103, A066195.
%K A102566 nonn,base
%O A102566 1,1
%A A102566 _Yasutoshi Kohmoto_, Feb 25 2005
%E A102566 More terms from _David Wasserman_, Apr 08 2008