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.

Previous Showing 11-20 of 24 results. Next

A292943 a(n) = A292944(A243071(n)); Base-2 expansion of a(n) encodes the steps where numbers of the form 6k+3 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 4, 0, 1, 4, 8, 4, 16, 8, 5, 0, 32, 2, 64, 8, 9, 16, 128, 8, 2, 32, 1, 16, 256, 10, 512, 0, 17, 64, 10, 4, 1024, 128, 33, 16, 2048, 18, 4096, 32, 9, 256, 8192, 16, 4, 4, 65, 64, 16384, 2, 18, 32, 129, 512, 32768, 20, 65536, 1024, 17, 0, 34, 34, 131072, 128, 257, 20, 262144, 8, 524288, 2048, 5, 256, 20, 66, 1048576, 32, 1, 4096
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A292944(A243071(n)).
a(1) = 0, and for n > 1, a(n) = 2*a(A252463(n)) + [n == 3 (mod 6)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 6k+3, and 0 otherwise.
For n >= 0, a(A163511(n)) = A292944(n).
For n >= 1, A292941(n) + a(n) + A292945(n) = a(n) + A292253(n) + A292255(n) = A243071(n).

A292253 a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(3|n) == 1], where J is the Jacobi-symbol.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 8, 4, 4, 8, 17, 8, 35, 16, 8, 8, 70, 8, 140, 16, 16, 34, 281, 16, 9, 70, 8, 32, 562, 16, 1124, 16, 32, 140, 17, 16, 2249, 280, 68, 32, 4498, 32, 8996, 68, 16, 562, 17993, 32, 19, 18, 140, 140, 35986, 16, 32, 64, 280, 1124, 71973, 32, 143947, 2248, 32, 32, 64, 64, 287894, 280, 560, 34, 575789, 32, 1151579, 4498, 16, 560, 34, 136, 2303158, 64
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Base-2 expansion of a(n) encodes the steps where numbers that are either of the form 12k+1 or of the form 12k+11 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n. An exception is the most significant bit of a(n) which corresponds with the final 1, but is shifted one bit-position towards right.
The AND - XOR formula(s) just restate the fact that J(3|n) = J(-1|n)*J(-3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Programs

  • Scheme
    (define (A292253 n) (if (<= n 2) (- n 1) (+ (if (and (odd? n) (= 1 (jacobi-symbol 3 n))) 1 0) (* 2 (A292253 (A252463 n))))))

Formula

a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(3|n) == 1], where J is the Jacobi-symbol, and [ ]'s are Iverson brackets, whose product gives 1 only if n is an odd number for which J(3|n) = +1, and 0 otherwise.
a(n) = A292263(n) AND (A292383(n) XOR A292941(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987). [See comments.]
For n >= 0, a(A163511(n)) = A292254(n).
For n >= 1, a(n) + A292255(n) + A292943(n) = A243071(n).

A292255 a(1) = 0, and for n > 1, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(3|n) == -1], where J is the Jacobi-symbol.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 3, 0, 0, 2, 6, 0, 12, 6, 0, 0, 25, 0, 51, 4, 4, 12, 102, 0, 0, 24, 0, 12, 205, 0, 411, 0, 12, 50, 0, 0, 822, 102, 24, 8, 1645, 8, 3291, 24, 0, 204, 6582, 0, 0, 0, 48, 48, 13165, 0, 9, 24, 100, 410, 26330, 0, 52660, 822, 8, 0, 25, 24, 105321, 100, 204, 0, 210642, 0, 421284, 1644, 0, 204, 1, 48, 842569, 16, 0, 3290, 1685138, 16, 48, 6582
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Base-2 expansion of a(n) encodes the steps where numbers that are either of the form 12k+5 or of the form 12k+7 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.
The AND - XOR formulas just restate the fact that J(3|n) = J(-1|n)*J(-3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Programs

  • Scheme
    (define (A292255 n) (if (<= n 1) 0 (+ (if (and (odd? n) (= -1 (jacobi-symbol 3 n))) 1 0) (* 2 (A292255 (A252463 n))))))

Formula

a(1) = 0, and for n > 1, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(3|n) == -1], where J is the Jacobi-symbol, and [ ]'s are Iverson brackets, whose product gives 1 only if n is an odd number for which J(3|n) = -1, and 0 otherwise.
a(n) = A292263(n) AND (A292383(n) XOR A292945(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987).
a(n) = A292263(n) AND (A292385(n) XOR A292941(n)). [See comments.]
For n >= 0, a(A163511(n)) = A292256(n).
For n >= 1, a(n) + A292253(n) + A292943(n) = A243071(n).

A292382 Base-2 expansion of a(n) encodes the steps where numbers of the form 4k+2 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 8, 4, 4, 9, 16, 10, 32, 17, 10, 8, 64, 9, 128, 18, 18, 33, 256, 20, 8, 65, 8, 34, 512, 21, 1024, 16, 34, 129, 20, 18, 2048, 257, 66, 36, 4096, 37, 8192, 66, 20, 513, 16384, 40, 16, 17, 130, 130, 32768, 17, 36, 68, 258, 1025, 65536, 42, 131072, 2049, 36, 32, 68, 69, 262144, 258, 514, 41, 524288, 36, 1048576, 4097, 18, 514, 40
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Reverse@ NestWhileList[Function[k, Which[k == 1, 1, EvenQ@ k, k/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ k]], n, # > 1 &] /. k_ /; IntegerQ@ k :> If[Mod[k, 4] == 2, 1, 0], 2], {n, 77}] (* Michael De Vlieger, Sep 21 2017 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A292382(n) = if(1==n,0,(if(2==(n%4),1,0)+(2*A292382(A252463(n)))));
    
  • PARI
    a(n) = my(m=factor(n),k=-2); sum(i=1,matsize(m)[1], 1 << (primepi(m[i,1]) + (k+=m[i,2]))); \\ Kevin Ryde, Dec 11 2020
    
  • Python
    from sympy.core.cache import cacheit
    from sympy.ntheory.factor_ import digits
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a292372(n):
        k=digits(n, 4)[1:]
        return 0 if n==0 else int("".join(['1' if i==2 else '0' for i in k]), 2)
    def a064989(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    def a252463(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n)
    @cacheit
    def a292384(n): return 1 if n==1 else 4*a292384(a252463(n)) + n%4
    def a(n): return a292372(a292384(n))
    print([a(n) for n in range(1, 111)]) # Indranil Ghosh, Sep 21 2017
  • Scheme
    (define (A292382 n) (A292372 (A292384 n)))
    

Formula

a(n) = A292272(A156552(n)).
a(1) = 0; for n > 1, a(n) = 2*a(A252463(n)) + [n == 2 (mod 4)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 4k+2, and 0 otherwise.
a(n) = A292372(A292384(n)).
Other identities. For n >= 1:
a(n) AND A292380(n) = 0, where AND is a bitwise-AND (A004198).
a(n) + A292380(n) = A156552(n).
A000120(a(n)) + A000120(A292380(n)) = A001222(n).

A292941 a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 6)].

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 9, 4, 4, 8, 18, 8, 37, 18, 8, 8, 74, 8, 149, 16, 16, 36, 298, 16, 9, 74, 8, 36, 596, 16, 1193, 16, 36, 148, 16, 16, 2387, 298, 72, 32, 4774, 32, 9549, 72, 16, 596, 19098, 32, 19, 18, 148, 148, 38196, 16, 33, 72, 296, 1192, 76392, 32, 152785, 2386, 32, 32, 72, 72, 305571, 296, 596, 32, 611142, 32, 1222285, 4774, 16, 596, 32
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

Base-2 expansion of a(n) encodes the steps where numbers of the form 6k+1 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n. An exception is the most significant bit of a(n) which corresponds with the final 1, but is shifted one bit-position towards right (less significant end).
The AND - XOR formulas just restate the fact that J(-3|n) = J(-1|n)*J(3|n), as the Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Programs

  • Scheme
    (define (A292941 n) (if (<= n 2) (- n 1) (+ (if (= 1 (modulo n 6)) 1 0) (* 2 (A292941 (A252463 n))))))

Formula

a(1) = 0, a(2) = 1, and for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 6)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 6k+1, and 0 otherwise.
Also, for n > 2, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(-3|n) = 1], where J is the Jacobi-symbol.
a(n) = A292263(n) AND (A292253(n) XOR A292383(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987).
a(n) = A292263(n) AND (A292255(n) XOR A292385(n)). [See comments.]
For n >= 0, a(A163511(n)) = A292942(n).
For n >= 1, a(n) + A292943(n) + A292945(n) = A243071(n).

A292380 Base-2 expansion of a(n) encodes the steps where multiples of 4 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 3, 2, 0, 0, 1, 0, 0, 0, 7, 0, 4, 0, 1, 0, 0, 0, 3, 4, 0, 6, 1, 0, 0, 0, 15, 0, 0, 0, 9, 0, 0, 0, 3, 0, 0, 0, 1, 2, 0, 0, 7, 8, 8, 0, 1, 0, 12, 0, 3, 0, 0, 0, 1, 0, 0, 2, 31, 0, 0, 0, 1, 0, 0, 0, 19, 0, 0, 8, 1, 0, 0, 0, 7, 14, 0, 0, 1, 0, 0, 0, 3, 0, 4, 0, 1, 0, 0, 0, 15, 0, 16, 2, 17, 0, 0, 0, 3, 0
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Examples

			For n = 4, the starting value is a multiple of four, after which follows A252463(4) = 2, and A252463(2) = 1, the end point of iteration, and neither 2 nor 1 is a multiple of four, thus a(4) = 1*(2^0) + 0*(2^1) + 0*(2^2) = 1.
For n = 8, the starting value is a multiple of four, after which follows A252463(8) = 4 (also a multiple), continuing as before as 4 -> 2 -> 1, thus a(8) = 1*(2^0) + 1*(2^1) + 0*(2^2) + 0*(2^3) = 3.
For n = 9, the starting value is not a multiple of four, after which follows A252463(9) = 4 (which is), continuing as before as 4 -> 2 -> 1, thus a(9) = 0*(2^0) + 1*(2^1) + 0*(2^2) + 0*(2^3) = 2.
		

Crossrefs

Programs

  • Mathematica
    Table[FromDigits[Reverse@ NestWhileList[Function[k, Which[k == 1, 1, EvenQ@ k, k/2, True, Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ k]], n, # > 1 &] /. k_ /; IntegerQ@ k :> If[Mod[k, 4] == 0, 1, 0], 2], {n, 105}] (* Michael De Vlieger, Sep 21 2017 *)
  • PARI
    a(n) = my(m=factor(n),k=-1,ret=0); for(i=1,matsize(m)[1], ret += bitneg(0,m[i,2]-1) << (primepi(m[i,1])+k); k+=m[i,2]); ret; \\ Kevin Ryde, Dec 11 2020
  • Python
    from sympy.core.cache import cacheit
    from sympy.ntheory.factor_ import digits
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a292370(n):
        k=digits(n, 4)[1:]
        return 0 if n==0 else int("".join(['1' if i==0 else '0' for i in k]), 2)
    def a064989(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    def a252463(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n)
    @cacheit
    def a292384(n): return 1 if n==1 else 4*a292384(a252463(n)) + n%4
    def a(n): return a292370(a292384(n))
    print([a(n) for n in range(1, 111)]) # Indranil Ghosh, Sep 21 2017
    
  • Scheme
    (define (A292380 n) (A292370 (A292384 n)))
    

Formula

a(n) = A048735(A156552(n)).
a(n) = A292370(A292384(n)).
Other identities. For n >= 1:
a(n) AND A292382(n) = 0, where AND is a bitwise-AND (A004198).
a(n) + A292382(n) = A156552(n).
A000120(a(n)) + A000120(A292382(n)) = A001222(n).
A000035(a(n)) = A121262(n).

A292384 a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + (n mod 4).

Original entry on oeis.org

1, 6, 27, 24, 109, 110, 439, 96, 97, 438, 1759, 440, 7037, 1758, 443, 384, 28149, 390, 112599, 1752, 1753, 7038, 450399, 1760, 389, 28150, 387, 7032, 1801597, 1774, 7206391, 1536, 7033, 112598, 1775, 1560, 28825565, 450398, 28155, 7008, 115302261, 7014, 461209047, 28152, 1761, 1801598, 1844836191, 7040, 1557, 1558, 112603, 112600
Offset: 1

Views

Author

Antti Karttunen, Sep 15 2017

Keywords

Comments

a(n) encodes in its base-4 representation the succession of modulo 4 residues obtained when map x -> A252463(x), starting from x=n, is iterated down to the eventual 1.

Crossrefs

Programs

  • Python
    from sympy.core.cache import cacheit
    from sympy import factorint, prevprime, prod
    def a064989(n):
        f = factorint(n)
        return 1 if n == 1 else prod(prevprime(i)**f[i] for i in f if i != 2)
    def a252463(n): return 1 if n==1 else n//2 if n%2==0 else a064989(n)
    @cacheit
    def a(n): return 1 if n==1 else 4*a(a252463(n)) + n%4
    print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Sep 21 2017

Formula

a(1) = 1; for n > 1, a(n) = 4*a(A252463(n)) + A010873(n).

A292945 Base-2 expansion of a(n) encodes the steps where numbers of the form 6k+5 are encountered when map x -> A252463(x) is iterated down to 1, starting from x=n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 2, 0, 0, 2, 5, 0, 10, 4, 0, 0, 21, 0, 42, 4, 4, 10, 85, 0, 0, 20, 0, 8, 171, 0, 342, 0, 8, 42, 1, 0, 684, 84, 20, 8, 1369, 8, 2738, 20, 0, 170, 5477, 0, 0, 0, 40, 40, 10955, 0, 8, 16, 84, 342, 21911, 0, 43822, 684, 8, 0, 17, 16, 87644, 84, 168, 2, 175289, 0, 350578, 1368, 0, 168, 3, 40, 701156, 16, 0, 2738, 1402313, 16, 40, 5476, 340, 40
Offset: 1

Views

Author

Antti Karttunen, Sep 28 2017

Keywords

Comments

The AND - XOR formulas are just a restatement of the fact that J(-3|n) = J(-1|n)*J(3|n), i.e., that Jacobi-symbol is multiplicative (also) with respect to its upper argument.

Crossrefs

Programs

  • Scheme
    (define (A292945 n) (if (<= n 1) 0 (+ (if (= 5 (modulo n 6)) 1 0) (* 2 (A292945 (A252463 n))))))

Formula

a(1) = 0, and for n > 1, a(n) = 2*a(A252463(n)) + [n == 5 (mod 6)], where the last part of the formula is Iverson bracket, giving 1 only if n is of the form 6k+5, and 0 otherwise.
Also, for n > 1, a(n) = 2*a(A252463(n)) + [n == 1 (mod 2)]*[J(-3|n) = -1], where J is the Jacobi-symbol.
a(n) = A292263(n) AND (A292255(n) XOR A292383(n)), where AND is bitwise-and (A004198) and XOR is bitwise-XOR (A003987).
a(n) = A292263(n) AND (A292253(n) XOR A292385(n)). [See comments.]
For n >= 0, a(A163511(n)) = A292946(n).
For n >= 1, A292941(n) + A292943(n) + a(n) = A243071(n).

A332896 a(1) = 0, and for n > 1, a(n) = 2*a(A332893(n)) + [n == 3 (mod 4)].

Original entry on oeis.org

0, 0, 1, 0, 2, 2, 5, 0, 0, 4, 21, 4, 10, 10, 5, 0, 42, 0, 85, 8, 8, 42, 341, 8, 0, 20, 1, 20, 170, 10, 1365, 0, 40, 84, 11, 0, 682, 170, 21, 16, 2730, 16, 5461, 84, 8, 682, 21845, 16, 0, 0, 85, 40, 10922, 2, 43, 40, 168, 340, 87381, 20, 43690, 2730, 17, 0, 16, 80, 349525, 168, 680, 22, 1398101, 0, 174762, 1364, 1, 340, 32, 42, 5592405, 32, 0, 5460
Offset: 1

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

Base-2 expansion of a(n) encodes the steps where numbers of the form 4k+3 are encountered when map x -> A332893(x) is iterated down to 1, starting from x=n. See the binary tree illustrated in A332815.

Crossrefs

Programs

Formula

a(1) = 0, and for n > 1, a(n) = 2*a(A332893(n)) + [n == 3 (mod 4)].
Other identities. For n >= 1:
a(2n) = 2*a(n).
a(A108546(n)) = A000975(n-1).

A292584 Compound filter: a(n) = P(A292583(n), A292585(n)), where P(n,k) is sequence A000027 used as a pairing function.

Original entry on oeis.org

1, 2, 5, 2, 8, 5, 13, 2, 4, 8, 19, 5, 25, 13, 9, 2, 32, 4, 41, 8, 12, 19, 51, 5, 16, 25, 5, 13, 72, 9, 85, 2, 18, 32, 14, 4, 98, 41, 26, 8, 112, 12, 128, 19, 8, 51, 145, 5, 46, 16, 33, 25, 180, 5, 18, 13, 49, 72, 200, 9, 220, 85, 13, 2, 24, 18, 242, 32, 60, 14, 265, 4, 288, 98, 8, 41, 19, 26, 313, 8, 4, 112, 339, 12, 33, 128, 62, 19, 365, 8, 25, 51, 84, 145
Offset: 1

Views

Author

Antti Karttunen, Sep 20 2017

Keywords

Comments

From Antti Karttunen, Sep 25 2017: (Start)
Some of the sequences this filter matches to:
For all i, j: a(i) = a(j) => A053866(i) = A053866(j).
For all i, j: a(i) = a(j) => A061395(i) = A061395(j). (also A006530, etc.)
For all i, j: a(i) = a(j) => A292378(i) = A292378(j).
The latter two implications follow simply because:
and, similarly, for n > 1,
and the sum of A292375(n) and A292377(n) is A061395(n) [index of the largest prime dividing n], while A292378 has been defined as 1 + their difference.
The case A053866 follows because of the component A292583, see comments under that entry. (End)

Crossrefs

Cf. also A006530, A061395, A292378 (some of the matched sequences).

Formula

a(n) = (1/2)*(2 + ((A292583(n)+A292585(n))^2) - A292583(n) - 3*A292585(n)).
Previous Showing 11-20 of 24 results. Next