[seqfan] Re: Number of primes having distinct first and last digitsboth 7 to 10^n primes
Robert G. Wilson v
rgwv at rgwv.com
Mon Aug 2 22:58:06 CEST 2010
Dear Charles,
Or Enoch Haga miscalculated, but probably not. Anyway, if we assume what is
the natural interpretation then the sequence should be:
{1, 0, 4, 30, 230, 1839, 15788, 138065, 1223219, ..., } I used the
Mathematica coding:
f[n_] := Block[{c = 0, p = 7*10^(n - 1), lmt = 8*10^(n - 1)}, While[p < lmt,
If[ IntegerDigits[p][[-1]] == 7, c++ ]; p = NextPrime at p]; c]; Do[Print[{n,
f at n // Timing}], {n, 8}]
Sincerely yours, Bob.
--------------------------------------------------
From: "Charles Greathouse" <charles.greathouse at case.edu>
Sent: Monday, August 02, 2010 4:21 PM
To: "Sequence Fanatics Discussion list" <seqfan at list.seqfan.eu>
Subject: [seqfan] Number of primes having distinct first and last digitsboth
7 to 10^n primes
> A145711 is defined as "Number of primes having distinct first and last
> digits both 7 to 10^n primes". It seems to mean something similar to
> "Number of primes below 10^n with distinct first and last decimal
> digits", but this isn't quite it. Can anyone decipher it?
>
> From its description:
> Comment: The first prime with equal first and last digits is 11 -- the
> two digits must be distinct, so 7, for example, cannot be
> double-counted.
> Example: a(3)=32 because to 10^3 or 1000 primes, ending in 7919, there
> are 32 primes with equal and distinct first and last digits: 7 and 7.
>
> It also needs keyword work: it needs "base" but not "easy" (since it
> involves exponentially many terms).
>
> Charles Greathouse
> Analyst/Programmer
> Case Western Reserve University
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
More information about the SeqFan
mailing list