cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A246269 a(1) = 1, a(p(k)) = p(k+1) mod 4 for k-th prime p(k) and a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

1, 3, 1, 9, 3, 3, 3, 27, 1, 9, 1, 9, 1, 9, 3, 81, 3, 3, 3, 27, 3, 3, 1, 27, 9, 3, 1, 27, 3, 9, 1, 243, 1, 9, 9, 9, 1, 9, 1, 81, 3, 9, 3, 9, 3, 3, 1, 81, 9, 27, 3, 9, 3, 3, 3, 81, 3, 9, 1, 27, 3, 3, 3, 729, 3, 3, 3, 27, 1, 27, 1, 27, 3, 3, 9, 27, 3, 3, 3, 243, 1, 9, 1, 27, 9, 9, 3, 27
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

This is a fully multiplicative sequence. Only powers of 3 (A000244) occur as terms.

Examples

			For n = 10 = 2*5 = p_1 * p_3 we have a(n) = (p_{1+1} mod 4)*(p_{3+1} mod 4) = (p_2 mod 4) * (p_4 mod 4) = (3 mod 4)*(7 mod 4) = 3*3 = 9.
		

Crossrefs

Programs

  • PARI
    default(primelimit, 2^22)
    A246269(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = (nextprime(f[i, 1]+1)%4)); factorback(f);
    for(n=1, 10080, write("b246269.txt", n, " ", A246269(n)));
    
  • Scheme
    (define (A246269 n) (A065338 (A003961 n)))

Formula

a(n) = A065338(A003961(n)).
a(n) = A000244(A246270(n)).