A128511 Numbers which are both lucky and pentagonal.
1, 51, 477, 651, 925, 2625, 5551, 6501, 9801, 17767, 20475, 25285, 26467, 29751, 39285, 45327, 67947, 75825, 84135, 84847, 95887, 99717, 102051, 114955, 135751, 151527, 154401, 178365, 245835, 261877, 272001, 275847, 287547, 292825, 307587
Offset: 1
Examples
a(2) = 51 = A000959(14) = A000326(6). a(3) = 477 = A000959(81) = A000326(18).
Links
- Donovan Johnson, Table of n, a(n) for n = 1..1244 (terms < 10^9)
Programs
-
Maple
isA000326 := proc(n) local di ; if issqr(1+24*n) or n =0 then di := 1+sqrt(1+24*n); if di mod 6 = 0 or n = 0 then true ; else false ; fi ; else false ; fi; end: lin := fscanf("b000959.txt","%d %d") : while lin <> [] do a := op(2,lin) ; if isA000326( a ) then printf("%d, ",a) ; fi ; lin := fscanf("b000959.txt","%d %d") ; od : # R. J. Mathar, May 13 2007
-
Mathematica
lim=320000;lp=Ceiling[Sqrt[2lim/3]];lL=lim/2;p=Array[# (3 # - 1)/2 &, lp, 0] ;L = Table[2*i + 1, {i, 0, lL}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]];Select[Range[lim],MemberQ[p,#]&&MemberQ[L,#]&] (* James C. McMahon, Jan 09 2025 *)
Extensions
More terms from R. J. Mathar, May 13 2007
Comments