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.

Showing 1-7 of 7 results.

A286372 a(n) = A286366(A064216(n)).

Original entry on oeis.org

4, 6, 8, 13, 4, 9, 8, 11, 13, 12, 14, 8, 28, 6, 9, 13, 11, 21, 9, 11, 13, 12, 8, 8, 40, 14, 9, 65, 14, 13, 8, 13, 64, 13, 11, 8, 9, 30, 20, 12, 4, 9, 21, 11, 8, 21, 14, 20, 12, 9, 12, 13, 23, 9, 8, 11, 13, 64, 8, 84, 28, 14, 116, 12, 14, 9, 85, 11, 8, 12, 11, 65, 65, 42, 8, 13, 13, 21, 9, 11, 21, 13, 66, 8, 28, 12, 9, 49, 14, 13, 8, 11, 65, 20, 14, 13, 9, 66
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A286366(A064216(n)).

A286373 a(n) = A286366(A048673(n)).

Original entry on oeis.org

4, 6, 8, 13, 4, 6, 11, 11, 13, 8, 9, 9, 28, 12, 30, 12, 14, 11, 8, 6, 9, 13, 21, 12, 40, 14, 269, 42, 4, 13, 8, 14, 64, 13, 21, 12, 65, 20, 8, 21, 11, 8, 11, 8, 11, 8, 116, 20, 13, 14, 8, 65, 23, 9, 11, 13, 14, 9, 9, 11, 14, 11, 66, 85, 21, 30, 28, 11, 12, 13, 13, 42, 14, 11, 20, 14, 30, 6, 66, 9, 12, 84, 49, 11, 8, 9, 23, 8, 28, 9, 11, 8, 65, 13, 484, 11, 20
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Crossrefs

Programs

Formula

a(n) = A286366(A048673(n)).

A286365 Compound filter: a(n) = 2*A286364(n) + A000035(A007814(n)).

Original entry on oeis.org

2, 3, 4, 2, 6, 5, 4, 3, 14, 7, 4, 4, 6, 5, 10, 2, 6, 15, 4, 6, 32, 5, 4, 5, 20, 7, 58, 4, 6, 11, 4, 3, 32, 7, 10, 14, 6, 5, 10, 7, 6, 33, 4, 4, 24, 5, 4, 4, 14, 21, 10, 6, 6, 59, 10, 5, 32, 7, 4, 10, 6, 5, 134, 2, 42, 33, 4, 6, 32, 11, 4, 15, 6, 7, 28, 4, 32, 11, 4, 6, 242, 7, 4, 32, 42, 5, 10, 5, 6, 25, 10, 4, 32, 5, 10, 5, 6, 15, 134, 20, 6, 11, 4, 7, 46, 7
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027) also information whether the exponent of the highest power of 2 dividing n is even or odd, which is stored in the least significant bit of a(n). Thus, for example, all squares (A000290) can be obtained by listing such numbers n that a(n) is even and both A002260(a(n)/2) & A004736(a(n)/2) are perfect squares.

Crossrefs

Cf. A286366, A286367 (similar, but contain more information).

Programs

  • 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 a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
    def a(n): return 2*a286364(n) + a007814(n)%2 # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286365 n) (+ (* 2 (A286364 n)) (A000035 (A007814 n))))
    

Formula

a(n) = (2*A286364(n)) + (1 - A035263(n)) = 2*A286364(n) + A000035(A007814(n)).

A072400 (Factors of 4 removed from n) modulo 8.

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 2, 1, 2, 3, 3, 5, 6, 7, 1, 1, 2, 3, 5, 5, 6, 7, 6, 1, 2, 3, 7, 5, 6, 7, 2, 1, 2, 3, 1, 5, 6, 7, 2, 1, 2, 3, 3, 5, 6, 7, 3, 1, 2, 3, 5, 5, 6, 7, 6, 1, 2, 3, 7, 5, 6, 7, 1, 1, 2, 3, 1, 5, 6, 7, 2, 1, 2, 3, 3, 5, 6, 7, 5, 1, 2, 3, 5, 5, 6, 7, 6, 1, 2, 3, 7, 5, 6, 7, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 16 2002

Keywords

Comments

a(n) <> 7 iff n equals the sum of 3 integer squares.
a(A004215(k)) = 7 for k>0;

Examples

			From _Michael De Vlieger_, May 08 2017: (Start)
a(4) = 1 since 4 = 1 * 4^1 and 4 / 4^1 = 1; 1 = 1 (mod 8).
a(5) = 5 since it is not a multiple of 4; 5 = 5 (mod 8).
a(12) = 3 since 12 = 3 * 4^1 and 12 / 4^1 = 3; 3 = 3 (mod 8).
a(44) = 3 since 44 = 11 * 4^1 and 44 / 4^1 = 11; 3 = 11 (mod 8).
a(64) = 1 since 64 = 1 * 4^3 and 64 / 4^3 = 1; 1 = 1 (mod 8). (End)
		

Crossrefs

Programs

  • Mathematica
    Array[Mod[If[Mod[#, 4] == 0, #/4^IntegerExponent[#, 4], #], 8] &, 96] (* Michael De Vlieger, May 08 2017 *)
  • PARI
    a(n) = (n >> (2*valuation(n, 4))) % 8; \\ Amiram Eldar, May 15 2025
  • Python
    def A072400(n): return (n>>((~n&n-1).bit_length()&-2))&7 # Chai Wah Wu, Aug 01 2023
    

Formula

a(n) = A065883(n) mod 8.
A072401(n) = 1 - A057427(7 - a(n)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 4. - Amiram Eldar, May 15 2025

Extensions

Offset corrected (from 0 to 1) by Antti Karttunen, May 08 2017

A286369 Compound filter: a(n) = 2*A286364(n) + floor(A072400(n)/4).

Original entry on oeis.org

2, 2, 4, 2, 7, 5, 5, 2, 14, 6, 4, 4, 7, 5, 11, 2, 6, 14, 4, 7, 33, 5, 5, 5, 20, 6, 58, 5, 7, 11, 5, 2, 32, 6, 10, 14, 7, 5, 11, 6, 6, 32, 4, 4, 25, 5, 5, 4, 14, 20, 10, 7, 7, 59, 11, 5, 32, 6, 4, 11, 7, 5, 135, 2, 42, 32, 4, 6, 33, 11, 5, 14, 6, 6, 28, 4, 33, 11, 5, 7, 242, 6, 4, 33, 43, 5, 11, 5, 6, 24, 10, 5, 33, 5, 11, 5, 6, 14, 134, 20, 7, 11, 5, 6, 46, 6
Offset: 1

Views

Author

Antti Karttunen, May 09 2017

Keywords

Comments

This sequence contains, in addition to the information contained in A286364 (which packs the values of A286361(n) and A286363(n) to a single value with the pairing function A000027) also the bit-2 of A072400(n) (its third least significant bit), which is here stored as the least significant bit of a(n). In contrast to A286366, the parity of the highest power of 2 dividing n is not stored.
Thus we have (among other such identities) the following two identities related to equivalence class partitioning:
For all odd i, odd j: a(i) = a(j) <=> A286366(i) = A286366(j).
For all odd i, odd j: a(i) = a(j) => A010877(i) = A010877(j). [On odd numbers the information contained in a(n) is sufficient to determine the value of n modulo 8, one of the 1, 3, 5 or 7.]

Crossrefs

Programs

  • Python
    from sympy.ntheory.factor_ import digits
    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 a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
    def a072400(n): return int(str(int(''.join(map(str, digits(n, 4)[1:]))[::-1]))[::-1], 4)%8
    def a(n): return 2*a286364(n) + int(a072400(n)/4) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286369 n) (+ (* 2 (A286364 n)) (floor->exact (/ (A072400 n) 4))))
    

Formula

a(n) = 2*A286364(n) + floor(A072400(n)/4).

A286368 a(n) = 4*A072401(n) + 2*A229062(n) + A010052(n).

Original entry on oeis.org

3, 2, 0, 3, 2, 0, 4, 2, 3, 2, 0, 0, 2, 0, 4, 3, 2, 2, 0, 2, 0, 0, 4, 0, 3, 2, 0, 4, 2, 0, 4, 2, 0, 2, 0, 3, 2, 0, 4, 2, 2, 0, 0, 0, 2, 0, 4, 0, 3, 2, 0, 2, 2, 0, 4, 0, 0, 2, 0, 4, 2, 0, 4, 3, 2, 0, 0, 2, 0, 0, 4, 2, 2, 2, 0, 0, 0, 0, 4, 2, 3, 2, 0, 0, 2, 0, 4, 0, 2, 2, 0, 4, 0, 0, 4, 0, 2, 2, 0, 3, 2, 0, 4, 2, 0, 2, 0, 0, 2, 0, 4, 4, 2, 0, 0, 2, 2, 0, 4, 0
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Comments

Partitions natural numbers to the same equivalence classes as A002828. That is, for all i, j: a(i) = a(j) <=> A002828(i) = A002828(j). To get A002828 replace 0's with 3's, 3's with 1's and keep 2's as 2's and 4's as 4's.

Crossrefs

Programs

Formula

a(n) = 4*A072401(n) + 2*A229062(n) + A010052(n).

A286386 Compound filter: a(n) = 2*A286473(n) + (1 if n is a square, 0 otherwise).

Original entry on oeis.org

3, 12, 14, 21, 10, 28, 14, 36, 31, 44, 14, 52, 10, 60, 46, 69, 10, 76, 14, 84, 62, 92, 14, 100, 43, 108, 78, 116, 10, 124, 14, 132, 94, 140, 58, 149, 10, 156, 110, 164, 10, 172, 14, 180, 126, 188, 14, 196, 63, 204, 142, 212, 10, 220, 90, 228, 158, 236, 14, 244, 10, 252, 174, 261, 106, 268, 14, 276, 190, 284, 14, 292, 10, 300, 206, 308, 94, 316, 14, 324, 223
Offset: 1

Views

Author

Antti Karttunen, May 13 2017

Keywords

Crossrefs

Cf. A000290 (gives the positions off odd terms), A010052, A286473, A286366, A286388.

Programs

  • Python
    from sympy import sqrt, divisors, primefactors
    import math
    def a010052(n): return 1 if n<1 else int(math.floor(sqrt(n))) - int(math.floor(sqrt(n - 1)))
    def a286473(n): return 1 if n==1 else 4*divisors(n)[-2] + (min(primefactors(n))%4)
    def a(n): return 2*a286473(n) + a010052(n) # Indranil Ghosh, May 14 2017
  • Scheme
    (define (A286386 n) (+ (* 2 (A286473 n)) (A010052 n)))
    

Formula

a(n) = 2*A286473(n) + A010052(n).
Showing 1-7 of 7 results.