OFFSET
1,3
COMMENTS
This sequence packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027. These two components essentially give the prime signature of 4k+1 part and the prime signature of 4k+3 part, and they can be accessed from a(n) with functions A002260 and A004736. For example, A004431 lists all such numbers that the first component is larger than one and the second component is a perfect square.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Pairing Function
FORMULA
PROG
(Scheme) (define (A286364 n) (* (/ 1 2) (+ (expt (+ (A286361 n) (A286363 n)) 2) (- (A286361 n)) (- (* 3 (A286363 n))) 2)))
(Python)
from sympy import factorint
from operator import mul
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def A(n, k):
f = factorint(n)
return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3))) # Indranil Ghosh, May 09 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 08 2017
STATUS
approved