login
Take 1, skip 2, take 2, skip 3, take 3, etc.
10

%I #43 Jul 20 2024 08:27:40

%S 1,4,5,9,10,11,16,17,18,19,25,26,27,28,29,36,37,38,39,40,41,49,50,51,

%T 52,53,54,55,64,65,66,67,68,69,70,71,81,82,83,84,85,86,87,88,89,100,

%U 101,102,103,104,105,106,107,108,109,121,122,123,124,125,126,127,128

%N Take 1, skip 2, take 2, skip 3, take 3, etc.

%C A253607(a(n)) < 0. - _Reinhard Zumkeller_, Jan 05 2015

%C Integers m such that A000196(m) = A079643(m). - _Firas Melaih_, Dec 10 2020

%C Also possible values of floor(x*floor(x)) for real x >= 1. - _Jianing Song_, Feb 16 2021

%H Harry J. Smith, <a href="/A064801/b064801.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = A004202(n) - 1.

%F Can be interpreted as a table read by rows: T(n,k) = n^2 + k, 0 <= k < n. T(n,k) = 0 iff k > A000196(n); T(n,0) = A000290(n); T(n,1) = A002522(n) for n > 1; T(n,2) = A010000(n) = A059100(n) for n > 2; T(n, n-3) = A014209(n-1) for n > 2; T(n, n-2) = A028552(n) for n > 1; T(n, n-1) = A028387(n-1); T(2*n+1, n) = A001107(n+1). - _Reinhard Zumkeller_, Nov 18 2003

%F Numbers k such that floor(sqrt(k)) * (floor(sqrt(k)) + 1) > k. - _Rainer Rosenthal_, Jul 19 2024

%p seq(`if`(floor(sqrt(k)) * (floor(sqrt(k)) + 1) > k, k, NULL), k = 0..2034); # a(1)..a(1000), _Rainer Rosenthal_, Jul 19 2024

%t a = Table[n, {n, 0, 200} ]; b = {}; Do[a = Drop[a, {1, n} ]; b = Append[b, Take[a, {1, n} ]]; a = Drop[a, {1, n} ], {n, 1, 14} ]; Flatten[b]

%t Flatten[Table[Range[n^2,n^2+n-1],{n,12}]] (* _Harvey P. Dale_, Dec 18 2015 *)

%o (PARI) { n=0; for (m=1, 10^9, s=m^2; a=0; for (k=0, m - 1, a=s+k; write("b064801.txt", n++, " ", a); if (n==1000, return)) ) } \\ _Harry J. Smith_, Sep 26 2009

%o (Haskell)

%o a064801 n = a064801_list !! (n-1)

%o a064801_list = f 1 [1..] where

%o f k xs = us ++ f (k + 1) (drop (k + 1) vs)

%o where (us, vs) = splitAt k xs

%o -- _Reinhard Zumkeller_, May 16 2014

%o (Python)

%o from math import isqrt # after _Rainer Rosenthal_

%o def isA(k: int): return k < ((s:=isqrt(k)) * (s + 1))

%o print([k for k in range(129) if isA(k)]) # _Peter Luschny_, Jul 19 2024

%Y Cf. A007606, A004202, A048859.

%Y Cf. A061885 (complement), A253607.

%Y Cf. A136272.

%K easy,nonn

%O 1,2

%A _Robert G. Wilson v_, Oct 21 2001