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!)
A319707 Filter sequence which records for primes their residue modulo 6, and for all other numbers assigns a unique number. 3
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 11, 7, 12, 13, 14, 5, 15, 7, 16, 17, 18, 5, 19, 20, 21, 22, 23, 5, 24, 7, 25, 26, 27, 28, 29, 7, 30, 31, 32, 5, 33, 7, 34, 35, 36, 5, 37, 38, 39, 40, 41, 5, 42, 43, 44, 45, 46, 5, 47, 7, 48, 49, 50, 51, 52, 7, 53, 54, 55, 5, 56, 7, 57, 58, 59, 60, 61, 7, 62, 63, 64, 5, 65, 66, 67, 68, 69, 5, 70, 71, 72, 73, 74, 75, 76, 7, 77, 78, 79, 5, 80, 7, 81, 82, 83, 5, 84, 7, 85, 86, 87, 5, 88, 89, 90, 91, 92, 93, 94, 95 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of function f defined as f(n) = A010875(n) when n is a prime, otherwise -n.
Primes of the form 6k+5 (A007528) get value 5, and the primes of the form 6k+1 (A002476) get value 7, while for all other n, a(n) is assigned to a unique running count.
For all i, j:
a(i) = a(j) => A010875(i) = A010875(j),
a(i) = a(j) => A305900(i) = A305900(j),
a(i) = a(j) => A319717(i) = A319717(j) => A319716(i) = A319716(j).
LINKS
PROG
(PARI)
up_to = 100000;
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
A319707aux(n) = if(isprime(n), (n%6), -n);
v319707 = rgs_transform(vector(up_to, n, A319707aux(n)));
A319707(n) = v319707[n];
CROSSREFS
Cf. A007528 (positions of 5's), A002476 (positions of 7's).
Cf. also A319704.
Differs from A319716 for the first time at n=121.
Sequence in context: A320117 A319996 A319716 * A319717 A292266 A292267
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 04 2018
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 24 15:42 EDT 2024. Contains 371960 sequences. (Running on oeis4.)