OFFSET
1,2
COMMENTS
Integers of the form sqrt(840*k+1) for k >= 0. - Boyd Blundell, Jul 10 2021
LINKS
Ray Chandler, Table of n, a(n) for n = 1..10000
A. Feist, On the Density of Birthday Sets, The Pentagon, 60 (No. 1, Fall 2000), 31-35.
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,1,-1).
FORMULA
G.f.: x*(1 + 28*x + 12*x^2 + 30*x^3 + 68*x^4 + 30*x^5 + 12*x^6 + 28*x^7 + x^8) / ((1+x)*(x^2+1)*(x^4+1)*(x-1)^2). - R. J. Mathar, Oct 08 2011
a(n) = a(n-8) + 210 = a(n-1) + a(n-8) - a(n-9). - Charles R Greathouse IV, Oct 20 2014
a(n) = 105n/4 + O(1). - Charles R Greathouse IV, Oct 20 2014
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 1, -1}, {1, 29, 41, 71, 139, 169, 181, 209, 211}, 50] (* Harvey P. Dale, Sep 24 2014 *)
PROG
(PARI) is_A057539(n, m=[2, 3, 4, 5, 6, 7])=!for(i=1, #m, abs((n+1)%m[i]-1)==1||return)
(PARI) is(n)=for(i=4, 7, if(abs(centerlift(Mod(n, i)))!=1, return(0))); 1 \\ Charles R Greathouse IV, Oct 20 2014
(Python)
def ok(n): return all(n%d in [1, d-1] for d in range(2, 8))
def aupto(nn): return [m for m in range(1, nn+1) if ok(m)]
print(aupto(1300)) # Michael S. Branicky, Jan 29 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Andrew R. Feist (andrewf(AT)math.duke.edu), Sep 06 2000
EXTENSIONS
Offset corrected to 1 by Ray Chandler, Jul 29 2019
STATUS
approved