login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A201543 a(n) is the smallest positive integer not in {a(1), ..., a(n - 1)} such that the sum of the least significant digit of a(n) and the most significant digit of a(n - 1) is a prime, with a(1) = 1. 1
1, 2, 3, 4, 7, 6, 5, 8, 9, 12, 11, 14, 16, 21, 10, 22, 13, 24, 15, 26, 19, 31, 18, 32, 20, 23, 25, 29, 30, 28, 33, 34, 38, 40, 17, 36, 42, 27, 35, 44, 37, 48, 39, 50, 46, 41, 43, 47, 49, 51, 52, 56, 58, 60, 45, 53, 62, 55, 66, 57, 68, 61, 65, 67, 71, 54, 70, 64, 75, 74, 76, 80, 59, 72, 84, 63, 77, 86, 69, 81, 73, 90, 78, 94, 82, 79, 96, 88, 83, 85, 89, 93, 92, 98, 102, 91, 104, 101, 106, 111, 112, 114, 116, 121, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Eric Angelini is the originator of this sequence. It is believed that the sequence is a derangement of the positive integers.

LINKS

Table of n, a(n) for n=1..105.

EXAMPLE

a(1) = 1 so a(2) >= 2. As the most significant digit of a(1)+ the least significant digit of a(2) equals 3, a prime, then a(2) = 2.

MAPLE

A201543 := proc(n)

    option remember;

    if n =1 then

        1;

    else

        for a from 2 do

            if not a in [seq(procname(i), i=1..n-1)] then

                adgs := convert(a, base, 10) ;

                a1dgs := convert(procname(n-1), base, 10) ;

                if isprime(op(1, adgs)+op(-1, a1dgs)) then

                    return a;

                end if;

            end if;

        end do:

    end if;

end proc:

for n from 1 to 120 do

    printf("%d, ", A201543(n)) ;

end do: # R. J. Mathar, Dec 14 2011

MATHEMATICA

ericPrimer[1] := 1; SetAttributes[ericPrimer, Listable]; ericPrimer[n_] := ericPrimer[n] = Module[{iter, prevEPs = ericPrimer[Range[n - 1]], notFound = True}, iter = Complement[Range[Max[prevEPs] + 1], prevEPs][[1]]; While[notFound, While[MemberQ[prevEPs, iter], iter++]; notFound = Not[PrimeQ[IntegerDigits[iter][[1]] + IntegerDigits[prevEPs[[-1]]][[-1]]]]; If[notFound, iter++]]; Return[iter]]; ericPrimer[Range[100]] (* Alonso del Arte, Dec 02 2011 *)

CROSSREFS

Sequence in context: A263273 A264966 A308728 * A073666 A092842 A072028

Adjacent sequences:  A201540 A201541 A201542 * A201544 A201545 A201546

KEYWORD

nonn,base

AUTHOR

Christopher Hunt Gribble, Dec 02 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 17 22:05 EDT 2019. Contains 328134 sequences. (Running on oeis4.)