login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A164386
Numbers which are not 1 larger than a nonzero square.
2
1, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
OFFSET
1,2
LINKS
FORMULA
{1} U {A000027 \ A002522} (complement of A002522).
a(n) = n + floor(sqrt(n-1) + 1/2).
EXAMPLE
For n = 26, a(26) = n + [sqrt(n-1) + 1/2] = 26 + [sqrt(26-1) + 1/2] = 26 + [5.5] = 31.
MATHEMATICA
With[{nn=100}, Complement[Range[nn], Range[Floor[Sqrt[nn]]]^2+1]] (* Harvey P. Dale, Sep 06 2022 *)
PROG
(PARI) is(n)=!issquare(n-1) || n==1 \\ Charles R Greathouse IV, Sep 01 2015
CROSSREFS
Sequence in context: A085925 A107907 A080804 * A111909 A184010 A256827
KEYWORD
nonn,easy
AUTHOR
Jaroslav Krizek, Aug 14 2009
EXTENSIONS
Edited by R. J. Mathar, Aug 20 2009
Corrected by Jaroslav Krizek, Oct 24 2009
STATUS
approved