This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A319704 Filter sequence which records for primes their residue modulo 4, and for all other numbers assigns a unique number. 8
 1, 2, 3, 4, 5, 6, 3, 7, 8, 9, 3, 10, 5, 11, 12, 13, 5, 14, 3, 15, 16, 17, 3, 18, 19, 20, 21, 22, 5, 23, 3, 24, 25, 26, 27, 28, 5, 29, 30, 31, 5, 32, 3, 33, 34, 35, 3, 36, 37, 38, 39, 40, 5, 41, 42, 43, 44, 45, 3, 46, 5, 47, 48, 49, 50, 51, 3, 52, 53, 54, 3, 55, 5, 56, 57, 58, 59, 60, 3, 61, 62, 63, 3, 64, 65, 66, 67, 68, 5, 69, 70, 71, 72, 73, 74, 75, 5, 76, 77, 78, 5, 79, 3 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Restricted growth sequence transform of function f defined as f(n) = A010873(n) when n is a prime, otherwise -n. For all i, j:   a(i) = a(j) => A010873(i) = A010873(j),   a(i) = a(j) => A305801(i) = A305801(j),   a(i) = a(j) => A319714(i) = A319714(j). LINKS Antti Karttunen, Table of n, a(n) for n = 1..100000 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; }; A319704aux(n) = if(isprime(n), -(n%4), n); v319704 = rgs_transform(vector(up_to, n, A319704aux(n))); A319704(n) = v319704[n]; CROSSREFS Cf. A010873, A305801, A319714. Cf. A002145 (positions of 3's), A002144 (positions of 5's). Cf. also A319350, A319705, A319706. Sequence in context: A319994 A319714 A320004 * A070675 A096894 A097751 Adjacent sequences:  A319701 A319702 A319703 * A319705 A319706 A319707 KEYWORD nonn AUTHOR Antti Karttunen, Sep 26 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 19 21:19 EDT 2019. Contains 326133 sequences. (Running on oeis4.)