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!)
A060291 Number of twin Harshads, including overlaps, whose sum is prime and where the 2nd Harshad is <= 10^n. 3
7, 8, 21, 60, 278, 1520, 9583, 61835, 419705, 3023007, 22597508 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
FORMULA
Generate the twin Harshads whose sum is prime. Count how many there are where the 2nd Harshad in the pair is <= to a consecutive power of 10.
EXAMPLE
a(1)=7 because there are 7 pairs of Harshads whose sum is prime and the 2nd Harshad in the pair is <= 10; these are 1+2=3, 2+3=5, 3+4=7, 5+6=11, 6+7=13, 8+9=17, 9+10=19. (Another sequence does not permit overlapping Harshad numbers.)
MATHEMATICA
harshadQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; c = 0; p = 10; s = {}; n = 0; k = 2; q1 = True; While[n < 6, q2 = harshadQ[k]; If[q1 && q2 && PrimeQ[2*k-1], c++; If[k > p, n++; AppendTo[s, c-1]; p *= 10]]; q1 = q2; k++]; s (* Amiram Eldar, Jan 19 2021 *)
CROSSREFS
Sequence in context: A308926 A152043 A181585 * A132899 A051175 A322651
KEYWORD
nonn,base,more
AUTHOR
Enoch Haga, Mar 24 2001
EXTENSIONS
a(8)-a(11) from Amiram Eldar, Jan 19 2021
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 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)