login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A082742 Indices of occurrences of 2 in A004738. 0
2, 4, 6, 8, 12, 14, 20, 22, 30, 32, 42, 44, 56, 58, 72, 74, 90, 92, 110, 112, 132, 134, 156, 158, 182, 184, 210, 212, 240, 242, 272, 274, 306, 308, 342, 344, 380, 382, 420, 422, 462, 464, 506, 508, 552, 554, 600, 602, 650, 652, 702, 704, 756, 758, 812, 814, 870, 872, 930, 932, 992, 994, 1056, 1058, 1122, 1124, 1190, 1192, 1260, 1262, 1332, 1334, 1406, 1408, 1482, 1484, 1560, 1562 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Indices of occurrences of 1 in A004738 are given by A002061, b(n) = n^2 - n + 1 (the central polygonal numbers). All entries are even.
LINKS
FORMULA
G.f.: 2*x*(1+x-x^2-x^3+x^4)/((1+x)^2*(1-x)^3). - Charles R Greathouse IV, Feb 03 2013
a(n) = 2*A134519(n). - R. J. Mathar, Feb 03 2013
MAPLE
A004738 := proc(n)
local f ;
f := floor(sqrt(n)+1/2) ;
f+1-abs(n-1-f^2) ;
end proc:
for n from 1 to 1600 do
if A004738(n) = 2 then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Feb 03 2013
MATHEMATICA
LinearRecurrence[{1, 2, -2, -1, 1}, {2, 4, 6, 8, 12}, 80] (* Harvey P. Dale, Jun 16 2017 *)
PROG
(PARI) a(n)=(n^2+2*n+8+if(n%2, 2*n-5))/4 \\ Charles R Greathouse IV, Feb 03 2013
CROSSREFS
Cf. A004738.
Sequence in context: A233578 A057220 A294847 * A131197 A078327 A214415
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 15 2003
EXTENSIONS
More terms from R. J. Mathar, Feb 03 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 03:15 EDT 2024. Contains 371964 sequences. (Running on oeis4.)