login
First occurrence of n in A100002; the least k such that A100002(k) = n.
11

%I #29 Aug 12 2024 13:06:56

%S 1,2,5,9,15,25,31,43,61,67,87,103,123,139,169,183,219,241,259,301,331,

%T 361,391,447,463,511,553,589,643,687,723,783,819,867,931,979,1027,

%U 1099,1179,1227,1309,1347,1393,1479,1539,1603,1699,1759,1863,1909,2019,2029

%N First occurrence of n in A100002; the least k such that A100002(k) = n.

%C Also, the first number that is crossed off at stage n in the Flavius sieve (A000960). - _N. J. A. Sloane_, Nov 21 2004

%C The sequence appears to grow roughly like 0.7825*n^2. Note that for n>2, the second occurrence of n in A100002 is at a(n)+1.

%C Equals main diagonal of triangle A101224, which is defined by the process starting with column 1: A101224(n,1) = n^2-n+1 for n>=1 and continuing with: A101224(n,k) = (n-k+1)*floor( (A101224(n,k-1) - 1)/(n-k+1) ) for k>1 until k=n. I.e., a(n) = A101224(n,n). - _Paul D. Hanna_, Dec 01 2004

%H Donovan Johnson, <a href="/A100287/b100287.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/J#Josephus">Index entries for sequences related to the Josephus Problem</a>

%F a(n) ~ Pi/4 * n^2 (via A000960). - _Bill McEachen_, Aug 08 2024

%t a[n_] := Fold[#2*Ceiling[#1/#2 + 1] &, 1, Reverse@Range[n - 1]]; Array[a, 30] (* _Birkas Gyorgy_, Feb 16 2011 *)

%o (PARI) {a(n)=local(A);for(k=1,n,if(k==1,A=n^2-n+1,A=(n-k+1)*floor((A-1)/(n-k+1))));A}

%Y Cf. A000960, A099259, A100002, A101224.

%Y Column 1 of A278507, column 2 of A278505 (without the initial 1-term).

%K nonn

%O 1,2

%A _T. D. Noe_, Nov 11 2004