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!)
A117650 Heptagonal numbers for which the sum of the digits is also a heptagonal number. 1
0, 1, 7, 34, 189, 403, 783, 1782, 2673, 3186, 3744, 4347, 6426, 7209, 8037, 8910, 10791, 11122, 12852, 13950, 15093, 16281, 17514, 21022, 21483, 24354, 27405, 30636, 32319, 34047, 35820, 39501, 41409, 43362, 45360, 47403, 51624, 53802, 56025 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
196981 is in the sequence because it is a heptagonal number and the sum of its digits (34) is also a heptagonal number.
MAPLE
N:= 10000: # to search the first N heptagonal numbers
sd:= n -> convert(convert(n, base, 10), `+`):
hept:= x -> type((3+sqrt(9+40*x))/10, integer) or x = 0:
select(hept @ sd, [seq(n*(5*n-3)/2, n=0..N)]);
# Robert Israel, Feb 14 2013
PROG
(PARI) isok(n) = ispolygonal(n, 7) && ispolygonal(sumdigits(n), 7);
for(n=0, 1e5, if(isok(n), print1(n, ", "))) \\ Altug Alkan, Dec 08 2015
CROSSREFS
Cf. A000566.
Sequence in context: A080048 A177140 A027233 * A365474 A273221 A144038
KEYWORD
nonn,base
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), Apr 11 2006
EXTENSIONS
a(0)=0 inserted by Georg Fischer, Mar 27 2024
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 11:36 EDT 2024. Contains 371968 sequences. (Running on oeis4.)