login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286240 Compound filter: a(n) = P(A278222(n), A278222(1+n)), where P(n,k) is sequence A000027 used as a pairing function. 5
2, 5, 12, 14, 23, 42, 59, 44, 23, 61, 142, 117, 109, 183, 261, 152, 23, 61, 142, 148, 601, 850, 607, 375, 109, 265, 1093, 939, 473, 765, 1097, 560, 23, 61, 142, 148, 601, 850, 607, 430, 601, 1741, 3946, 2545, 2497, 3463, 2509, 1323, 109, 265, 1093, 1117, 2497, 4525, 5707, 3153, 473, 1105, 4489, 3813, 1969, 3129, 4497, 2144, 23, 61, 142, 148, 601, 850, 607, 430, 601, 1741 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,1

LINKS

Antti Karttunen, Table of n, a(n) for n = 0..16383

Eric Weisstein's World of Mathematics, Pairing Function

FORMULA

a(n) = (1/2)*(2 + ((A278222(n)+A278222(1+n))^2) - A278222(n) - 3*A278222(1+n)).

PROG

(PARI)

A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ Modified from code of M. F. Hasler

A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011

A278222(n) = A046523(A005940(1+n));

A286240(n) = (2 + ((A278222(n)+A278222(1+n))^2) - A278222(n) - 3*A278222(1+n))/2;

for(n=0, 16383, write("b286240.txt", n, " ", A286240(n)));

(Scheme) (define (A286240 n) (* (/ 1 2) (+ (expt (+ (A278222 n) (A278222 (+ 1 n))) 2) (- (A278222 n)) (- (* 3 (A278222 (+ 1 n)))) 2)))

(Python)

from sympy import prime, factorint

import math

def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2

def A(n): return n - 2**int(math.floor(math.log(n, 2)))

def b(n): return n + 1 if n<2 else prime(1 + (len(bin(n)[2:]) - bin(n)[2:].count("1"))) * b(A(n))

def a005940(n): return b(n - 1)

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 a278222(n): return a046523(a005940(n + 1))

def a(n): return T(a278222(n), a278222(n + 1)) # Indranil Ghosh, May 07 2017

CROSSREFS

Cf. A000027, A278222, A286241, A286242, A286255.

Cf. A088705 (one of the matches not matched by A278222 alone. Thus also the whole A007814 (A001511) family is included).

Sequence in context: A286255 A286160 A286163 * A215974 A192524 A287553

Adjacent sequences:  A286237 A286238 A286239 * A286241 A286242 A286243

KEYWORD

nonn

AUTHOR

Antti Karttunen, May 07 2017

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 29 06:36 EDT 2021. Contains 346340 sequences. (Running on oeis4.)