A057538 Birthday set of order 5: numbers congruent to +-1 modulo 2, 3, 4 and 5.
1, 11, 19, 29, 31, 41, 49, 59, 61, 71, 79, 89, 91, 101, 109, 119, 121, 131, 139, 149, 151, 161, 169, 179, 181, 191, 199, 209, 211, 221, 229, 239, 241, 251, 259, 269, 271, 281, 289, 299, 301, 311, 319, 329, 331, 341, 349, 359, 361, 371, 379, 389, 391, 401, 409
Offset: 1
Examples
229 is congruent to 1 (mod 2), 1 (mod 3), 1 (mod 4) and -1 (mod 5). x+ 11*x^2 + 19*x^3 + 29*x^4 + 31*x^5 + 41*x^6 + 49*x^7 + 59*x^8 + 61*x^9 + ...
Links
- Michael De Vlieger, 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.
- A. Feist, Maple source for birthday sets. [Broken link]
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
Programs
-
Maple
for n from 1 to 409 do if (n^2 mod 30 =1) then print(n) fi od; # Gary Detlefs, Apr 17 2012
-
Mathematica
a057538[n_] := Block[{f}, f[x_] := If[Mod[x, #] == 1 || Mod[x, #] == # - 1, True, False] & /@ Range[2, 5]; Select[Range[n], DeleteDuplicates[f[#]] == {True} &]]; a057538[409] (* Michael De Vlieger, Dec 26 2014 *)
-
PARI
{a(n+1) = (n\4*3 + n%4)*10 + (-1)^(n\2)} /* Michael Somos, Oct 17 2006 */
Formula
A093722(n) = (a(n)^2 - 1)/120.
G.f.: x * (1 + 10*x + 8*x^2 + 10*x^3 + x^4) / ((1 - x) * (1 - x^4)). a(-1 - n) = -a(n). - Michael Somos, Jan 21 2012
4*a(n) = 30*(n+1) - 45 + 5*(-1)^n + 6*(-1)^floor((n+1)/2). - R. J. Mathar, Jul 30 2019
Extensions
Corrected by Henry Bottomley, Jan 31 2002
Offset corrected to 1 by Ray Chandler, Jul 29 2019
Comments