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.
a(3500) = a(2^2 * 5^3 * 7) = a(2) XOR a(2) XOR a(5) XOR a(5) XOR a(5) XOR a(7) = 1 XOR 1 XOR 4 XOR 4 XOR 4 XOR 8 = 0b0100 XOR 0b1000 = 0b1100 = 12. From _Peter Munn_, Jun 07 2021: (Start) The examples in the table below illustrate the homomorphisms (between polynomial structures) represented by this sequence. The staggering of the rows is to show how the mapping n -> A007913(n) -> A048675(A007913(n)) = a(n) relates to the encoded polynomials, as not all encodings are relevant at each stage. For an explanation of each polynomial encoding, see the sequence referenced in the relevant column heading. (Note also that A007913 generates squarefree numbers, and with these encodings, all squarefree numbers represent equivalent polynomials in N[x] and GF(2)[x,y].) |<----- encoded polynomials ----->| n A007913(n) a(n) | N[x] GF(2)[x,y] GF(2)[x]| |Cf.: A206284 A329329 A048720| -------------------------------------------------------------- 24 x+3 x+y+1 6 x+1 x+1 3 x+1 -------------------------------------------------------------- 36 2x+2 xy+y 1 0 0 0 0 -------------------------------------------------------------- 60 x^2+x+2 x^2+x+y 15 x^2+x x^2+x 6 x^2+x -------------------------------------------------------------- 90 x^2+2x+1 x^2+xy+1 10 x^2+1 x^2+1 5 x^2+1 -------------------------------------------------------------- This sequence is a left inverse of A019565. A019565(.) maps a(n) to A007913(n) for all n, effectively reversing the second stage of the mapping from n to a(n) shown above. So, with the encodings used here, A019565(.) represents each of two injective homomorphisms that map polynomials in GF(2)[x] to equivalent polynomials in N[x] and GF(2)[x,y] respectively. (End)
import Data.Bits (xor) a248663 = foldr (xor) 0 . map (\i -> 2^(i - 1)) . a112798_row -- Peter Kagey, Sep 16 2016
f:= proc(n) local F,f; F:= select(t -> t[2]::odd, ifactors(n)[2]); add(2^(numtheory:-pi(f[1])-1), f = F) end proc: seq(f(i),i=1..100); # Robert Israel, Jan 12 2015
a[1] = 0; a[n_] := a[n] = If[PrimeQ@ n, 2^(PrimePi@ n - 1), BitXor[a[#], a[n/#]] &@ FactorInteger[n][[1, 1]]]; Array[a, 66] (* Michael De Vlieger, Sep 16 2016 *)
A248663(n) = vecsum(apply(p -> 2^(primepi(p)-1),factor(core(n))[,1])); \\ Antti Karttunen, Feb 15 2021
from sympy import factorint, primepi from sympy.ntheory.factor_ import core def a048675(n): f=factorint(n) return 0 if n==1 else sum([f[i]*2**(primepi(i) - 1) for i in f]) def a(n): return a048675(core(n)) print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 21 2017
require 'prime' def f(n) a = 0 reverse_primes = Prime.each(n).to_a.reverse reverse_primes.each do |prime| a <<= 1 while n % prime == 0 n /= prime a ^= 1 end end a end (Scheme, with memoizing-macro definec) (definec (A248663 n) (cond ((= 1 n) 0) ((= 1 (A010051 n)) (A000079 (- (A000720 n) 1))) (else (A003987bi (A248663 (A020639 n)) (A248663 (A032742 n)))))) ;; Where A003987bi computes bitwise-XOR as in A003987. ;; Alternatively: (definec (A248663 n) (cond ((= 1 n) 0) (else (A003987bi (A000079 (- (A055396 n) 1)) (A248663 (A032742 n)))))) ;; Antti Karttunen, Dec 11 2015
For n=23 ("321" in factorial base representation, A007623), all three nonzero digits are maximal for their positions (they all occur on "maximal slope"), thus a(23) = prime(1)^3 = 2^3 = 8. For n=29 ("1021"), there are three nonzero digits, where both 2 and the rightmost 1 are on the "maximal slope", while the most significant 1 is on the "sub-sub-sub-maximal", thus a(29) = prime(1)^2 * prime(4)^1 = 2*7 = 28. For n=37 ("1201"), there are three nonzero digits, where the rightmost 1 is on the maximal slope, 2 is on the sub-maximal, and the most significant 1 is on the "sub-sub-sub-maximal", thus a(37) = prime(1) * prime(2) * prime(4) = 2*3*7 = 42. For n=55 ("2101"), the least significant 1 is on the maximal slope, and the digits "21" at the beginning are together on the sub-sub-maximal slope (as they are both two less than the maximal digit values 4 and 3 allowed in those positions), thus a(55) = prime(1)^1 * prime(3)^2 = 2*25 = 50.
from operator import mul from sympy import prime, factorial as f def a007623(n, p=2): return n if n0 else '0' for i in x)[::-1] return 0 if n==1 else sum(int(y[i])*f(i + 1) for i in range(len(y))) def a(n): return 1 if n==0 else a275732(n)*a(a257684(n)) print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
Comments