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-4 of 4 results.

A084091 Expansion of Sum_{k>=0} x^2^k/(1+x^2^k+x^2^(k+1)).

Original entry on oeis.org

0, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0
Offset: 0

Views

Author

Ralf Stephan, May 11 2003

Keywords

Comments

Chances of values -1/0/+1 are ~ 2:5:2.

Examples

			G.f. = x + x^4 - x^5 + x^7 - x^11 + x^13 + x^16 - x^17 + x^19 - x^20 - x^23 + ...
		

Crossrefs

Cf. A002487.
Positions of 0 are in A084090, of 1 in A084089, of -1 in A084088, of a(n)!=0 in A084087.
Cf. A373155 (from term a(1) onward absolute values, also parity of terms).

Programs

  • Mathematica
    a[ n_] := If[n < 1, 0, With[ {f = #/(1 + # + #^2) &}, SeriesCoefficient[ Sum[ f[x^2^k], {k, 0, Log[2, n]}], {x, 0, n}]]]; (* Michael Somos, Jun 16 2015 *)
    f[p_, e_] := If[Mod[p, 6] == 1, 1, (-1)^e]; f[2, e_] := (1 + (-1)^e)/2; f[3, e_] := 0; a[n_] := Times @@ f @@@ FactorInteger[n]; a[0] = 0; a[1] = 1; Array[a, 100, 0] (* Amiram Eldar, Sep 04 2023 *)
  • PARI
    {a(n) = my(A, m); if( n<1, 0, A = O(x); m=1; while( m<=n, m*=2; A = x / (1 + x + x^2) + subst(A, x, x^2)); polcoeff(A, n))}; /* Michael Somos, Jul 18 2004 */
    
  • PARI
    {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k,]; if( p==2, !(e%2), p==3, 0, kronecker( -12, p)^e)))}; /* Michael Somos, Jun 16 2015 */
    
  • PARI
    {a(n) = if( n<1, 0, direuler( p=1, n, if( p==2, 1 / (1 - X^2), p==3, 1, 1 / (1 - kronecker( -12, p) * X)))[n])}; /* Michael Somos, Jun 16 2015 */
    
  • PARI
    A084091(n) = if(!n, n, my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], !(f[k, 2]%2), if(2==(f[k, 1]%3), (-1)^f[k, 2], f[k, 1]%3)))); \\ Antti Karttunen, May 28 2024

Formula

a(2n) = a(n) + 1 - (n+1 mod 3), a(2n+1) = 1 - (n mod 3). - Ralf Stephan, Sep 27 2003
a(n) is multiplicative with a(2^e) = (1 + (-1)^e)/2, a(3^e) = 0^e, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Jul 18 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - v^2 + 2*w*(v-u) + w-v. - Michael Somos, Jul 18 2004
G.f.: Sum_{k>=0} f(x^2^k) where f(x) := x * (1 - x) / (1 - x^3). - Michael Somos, Jul 18 2004
max(Sum_{k=0..n} a(k)) = floor(log_4(n))+1. Proof by Nikolaus Meyberg.
Dirichlet g.f. (conjectured): L(chi_2(3),s)/(1-2^(-s)), with chi_2(3) the nontrivial Dirichlet character modulo 3. - Ralf Stephan, Mar 27 2015
a(2*n + 1) = A057078(n). a(3*n) = 0. a(3*n + 1) = A098725(n+1). - Michael Somos, Jun 16 2015

A352272 Numbers whose squarefree part is congruent to 1 modulo 6.

Original entry on oeis.org

1, 4, 7, 9, 13, 16, 19, 25, 28, 31, 36, 37, 43, 49, 52, 55, 61, 63, 64, 67, 73, 76, 79, 81, 85, 91, 97, 100, 103, 109, 112, 115, 117, 121, 124, 127, 133, 139, 144, 145, 148, 151, 157, 163, 169, 171, 172, 175, 181, 187, 193, 196, 199, 205, 208, 211, 217, 220, 223, 225, 229
Offset: 1

Views

Author

Peter Munn, Mar 10 2022

Keywords

Comments

Numbers of the form 4^i * 9^j * (6k+1), i, j, k >= 0.
Closed under multiplication.
The sequence forms a subgroup of the positive integers under the commutative operation A059897(.,.), one of 8 subgroups of the form {k : A007913(k) == 1 (mod m)} - in each case m is a divisor of 24. A059897 has a relevance to squarefree parts that arises from the identity A007913(k*n) = A059897(A007913(k), A007913(n)), where A007913(n) is the squarefree part of n.
The subgroup has 8 cosets, which partition the positive integers as follows. For each i in {1, 5}, j in {1, 2, 3, 6} there is a coset {m^2 * (6k+i) * j : m >= 1, k >= 0}. See the table in the examples.
None of the 8 cosets have been entered into the database previously, but many subgroups of the quotient group (which are formed of certain combinations of cosets) are represented among earlier OEIS sequences, including 6 of the 7 subgroups of index 2 (which combine 4 cosets). This sequence can therefore be defined as the intersection of pairs or triples of these sequences in many combinations (see the cross-references). See also the table in the example section of A352273 (the coset that includes 5).

Examples

			The squarefree part of 9 is 1, which is congruent to 1 (mod 6), so 9 is in the sequence.
The squarefree part of 14 is 14, which is congruent to 2 (mod 6), so 14 is not in the sequence.
The squarefree part of 52 = 2^2 * 13 is 13, which is congruent to 1 (mod 6), so 52 is in the sequence.
The 8 cosets described in the initial comments (forming a partition of the positive integers) are shown as rows of the following table. The first half of the table corresponds to (6k+i) with i=1; the second half to i=5, with row 5 being A352273.
   1,  4,   7,   9,  13,  16,  19,  25,  28,  31,  36, ...
   2,  8,  14,  18,  26,  32,  38,  50,  56,  62,  72, ...
   3, 12,  21,  27,  39,  48,  57,  75,  84,  93, 108, ...
   6, 24,  42,  54,  78,  96, 114, 150, 168, 186, 216, ...
   5, 11,  17,  20,  23,  29,  35,  41,  44,  45,  47, ...
  10, 22,  34,  40,  46,  58,  70,  82,  88,  90,  94, ...
  15, 33,  51,  60,  69,  87, 105, 123, 132, 135, 141, ...
  30, 66, 102, 120, 138, 174, 210, 246, 264, 270, 282, ...
The product of two positive integers is in this sequence if and only if they are in the same coset. The asymptotic density of cosets (containing) 1 and 5 is 1/4; of cosets 2 and 10 is 1/8; of cosets 3 and 15 is 1/12; of cosets 6 and 30 is 1/24.
		

Crossrefs

Intersection of any 2 of A055047, A339690 and A352274.
Intersection of any 4 sets chosen from A003159, A007417, A026225, A036668, A189715 and A225837 (in most cases, only 3 sets are needed - specifically if the pairwise intersections of the 3 sets differ from each other).
Closure of A084089 under multiplication by 9.
Other subsequences: A000290\{0}, A016921, A229848 (apparently, with 55 the first difference).
A334832 lists equivalent sequences modulo other divisors of 24.

Programs

  • PARI
    isok(m) = core(m) % 6 == 1;
    
  • Python
    from itertools import count
    def A352272(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = n+x
            for i in count(0):
                i2 = 9**i
                if i2>x:
                    break
                for j in count(0,2):
                    k = i2<x:
                        break
                    c -= (x//k-1)//6+1
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

{a(n) : n >= 1} = {m >= 1 : A007913(m) == 1 (mod 6)}.
{a(n) : n >= 1} = A334832 U A334832/7 U A334832/13 U A334832/19 where A334832/k denotes {A334832(m)/k : m >= 1, k divides A334832(m)}.
Using the same denotation, {a(n) : n >= 1} = A352273/5 = {A307151(A352273(m)) : m >= 1}.

A084087 Numbers k not divisible by 3 such that the exponent of the highest power of 2 dividing k is even.

Original entry on oeis.org

1, 4, 5, 7, 11, 13, 16, 17, 19, 20, 23, 25, 28, 29, 31, 35, 37, 41, 43, 44, 47, 49, 52, 53, 55, 59, 61, 64, 65, 67, 68, 71, 73, 76, 77, 79, 80, 83, 85, 89, 91, 92, 95, 97, 100, 101, 103, 107, 109, 112, 113, 115, 116, 119, 121, 124, 125, 127, 131
Offset: 1

Views

Author

Ralf Stephan, May 11 2003

Keywords

Comments

Numbers that are in both A001651 and A003159.
Numbers that are in either A084088 or A084089.
Complement of union of ({k==0 (mod 3)}, {2a(n)}) (A084090).
It seems that lim_{n->infinity} a(n)/n = 9/4. [This is true. The asymptotic density of this sequence is 4/9. - Amiram Eldar, Jan 16 2022]
Positions of nonzero coefficients in the expansion of Sum_{k>=0} x^2^k/(1 + x^2^k + x^2^(k+1)) (A084091).

Crossrefs

Disjoint union of A084089 and A084090.
Intersection of A001651 and A003159.
Also subsequence of A036668, A339690.

Programs

  • Mathematica
    Select[Range[200],Mod[#,3]!=0&&EvenQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, May 15 2018 *)
  • PARI
    for(n=0,100,if(valuation(n,2)%2==0&&n%3,print1(n",")))

A352274 Numbers whose squarefree part is congruent to 1 modulo 6 or 3 modulo 18.

Original entry on oeis.org

1, 3, 4, 7, 9, 12, 13, 16, 19, 21, 25, 27, 28, 31, 36, 37, 39, 43, 48, 49, 52, 55, 57, 61, 63, 64, 67, 73, 75, 76, 79, 81, 84, 85, 91, 93, 97, 100, 103, 108, 109, 111, 112, 115, 117, 121, 124, 127, 129, 133, 139, 144, 145, 147, 148, 151, 156, 157, 163, 165, 169, 171, 172
Offset: 1

Views

Author

Peter Munn, Mar 10 2022

Keywords

Comments

Numbers of the form 4^i * 3^j * (6k+1), i, j, k >= 0. Numbers whose prime factorization has an even number of factors of 2 and an even number of factors of the form 6k+5 (therefore also an even number of factors of the form 3k+2).
Closed under multiplication.
Includes the nonzero Loeschian numbers (A003136). The two sequences have few early differences (the first extra number here is a(22) = 55, followed by 85, 115, 145, ...), but their densities diverge progressively, driven by the presence here - and absence from A003136 - of the nonsquare terms of A108166. Asymptotic densities are 1/3 and 0 respectively.
Term by term, the sequence is one half of its complement within A225837.

Examples

			4 = 2^2 has square part 2^2, therefore squarefree part 4/2^2 = 1, which is congruent to 1 mod 6, so 4 is in the sequence.
63 = 3^2 * 7 has square part 3^2, therefore squarefree part 63/3^2 = 7, which is congruent to 1 mod 6, so 63 is in the sequence.
21 = 3*7 has square part 1^2 and squarefree part 21, which is congruent to 3 mod 18, so 21 is in the sequence.
72 = 2^3 * 3^2 has square part 2^2 * 3^2 = 6^2, therefore squarefree part 72/6^2 = 2, which is congruent to 2 mod 6 and to 2 mod 18, so 72 is not in the sequence.
		

Crossrefs

Intersection of any two of A003159, A026225 and A225837.
Closure of A084089 under multiplication by 3.
Cf. A007913.
Subsequences: A003136\{0}, A108166, A352272.

Programs

  • PARI
    isok(m) = core(m) % 6 == 1 || core(m) % 18 == 3;
    
  • Python
    from itertools import count
    def A352274(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            kmin = kmax >> 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c = n+x
            for i in count(0,2):
                i2 = 1<x:
                    break
                for j in count(0):
                    k = i2*3**j
                    if k>x:
                        break
                    c -= (x//k-1)//6+1
            return c
        return bisection(f,n,n) # Chai Wah Wu, Feb 14 2025

Formula

{a(n): n >= 1} = {m >= 1 : A007913(m) == 1 (mod 6)} U {m >= 1 : A007913(m) == 3 (mod 18)} = {A352272(m): m >= 1} U {3*A352272(m): m >= 1}.
{A225837(n): n >= 1} = {a(m): m >= 1} U {2*a(m): m >= 1}.
Showing 1-4 of 4 results.