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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A288054 Ordered prime numbers as encountered from the building set of positive integers. 0
2, 3, 13, 23, 31, 41, 43, 241, 421, 431, 1423, 2143, 2341, 4231, 5, 53, 251, 521, 523, 541, 1453, 1523, 1543, 2153, 2351, 2531, 2543, 3251, 3541, 4153, 4253, 4513, 4523, 5231, 5413, 5431, 61, 163, 263, 461, 463, 563, 613, 631, 641, 643, 653, 3461, 4261, 4561, 4621, 4651, 5261, 5623, 5641, 6143, 6421, 6451 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

A permutation of the prime numbers.

LINKS

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

EXAMPLE

The initial considered set is {1} which yields no primes. The next considered set is {1,2} which yields the prime 2. The next evaluation from {1,2,3} yields 3,13,23,31. Note that no considered integer is used more than once, so 11 is not added from {1,2,3}. Primes are ordered within each considered set. Thus we know the next sequence member after considering {1,2,3,4,5,6} will be 7. Note also that digits are not pulled from any subset element. Treating {1,2,...10} the 10 is not parsed or broken up, just considered in its entirety.

MATHEMATICA

a = {}; Do[s = Select[ FromDigits /@ Flatten[ Permutations /@ Subsets[ Flatten[ IntegerDigits /@ Range[n]]], 1], PrimeQ]; a = Join[a, Union@ Complement[s, a]], {n, 6}]; a (* Giovanni Resta, Jun 05 2017 *)

PROG

(Ruby)

require 'prime'

maxx=6

j5=1

myList=Array.new()

interm=Array.new()

final=Array.new()

myList[j5-1]=j5

while j5<maxx do

...j5+=1

...myList[j5-1]=j5

...if Prime.prime?(j5)==true

......ptr=final.length

......final[ptr]=j5

...end

...for i5 in 2..myList.length

......interm=myList.repeated_permutation(i5).to_a

......for k5 in 0..interm.length-1

.........temp=''

.........for m5 in 0..i5-1

............temp= [temp, interm[k5][m5].to_s].join

.........end

.........substr=j5.to_s

.........aok=1

.........for z in 0..temp.length-1

............for w in 0..temp.length-1

...............if z==w

..................next

...............elsif temp[z]==temp[w]

..................aok=0

..................break

...............end

............end

.........end

.........if aok>0 && Prime.prime?(temp.to_i)== true && temp.include?(substr)

............ptr=final.length

............final[ptr]=temp.to_i

.........end

......end

...end

end

p final

CROSSREFS

Cf. A000040.

Sequence in context: A137248 A136260 A296932 * A181521 A133201 A215302

Adjacent sequences:  A288051 A288052 A288053 * A288055 A288056 A288057

KEYWORD

base,easy,nonn

AUTHOR

Bill McEachen, Jun 04 2017

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 18 15:41 EDT 2019. Contains 328162 sequences. (Running on oeis4.)