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-10 of 609 results. Next

A078147 First differences of sequence of nonsquarefree numbers, A013929.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Nov 26 2002

Keywords

Comments

Run lengths in A132345, apart from initial run of zeros. - Reinhard Zumkeller, Apr 22 2012
The asymptotic density of the occurrences of 1 in this sequence is density(A068781)/density(A013929) = (1 - 2 * A059956 + A065474)/A229099 = 0.272347... - Amiram Eldar, Mar 09 2021

Examples

			a(1) = 4 = 8 - 4.
		

Crossrefs

Programs

  • Haskell
    a078147 n = a078147_list !! (n-1)
    a078147_list = zipWith (-) (tail a013929_list) a013929_list
    -- Reinhard Zumkeller, Apr 22 2012
    
  • Mathematica
    t=Flatten[Position[Table[MoebiusMu[w], {w, 1, 1000}], 0]]; t1=Delete[RotateLeft[t]-t, -1]
    Differences[Select[Range[300],!SquareFreeQ[#]&]] (* Harvey P. Dale, May 07 2012 *)
  • PARI
    lista(nn) = {my(prec=0); for (n=1, nn, if (!issquarefree(n), if (prec, print1(n-prec, ", ")); prec = n;););} \\ Michel Marcus, Mar 26 2020
    
  • Python
    from math import isqrt
    from sympy import mobius, factorint
    def A078147(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return next(i for i in range(1,5) if any(d>1 for d in factorint(m+i).values())) # Chai Wah Wu, Sep 10 2024

Formula

a(n) = A013929(n+1) - A013929(n).
a(n) = 1, 2, 3 or 4 since n = 4*k is always nonsquarefree.
Asymptotic mean: lim_{n->oo} (1/n) Sum_{k=1..n} a(k) = Pi^2/(Pi^2-6) = 2.550546... - Amiram Eldar, Oct 21 2020

Extensions

Offset fixed by Reinhard Zumkeller, Apr 22 2012

A376593 Second differences of consecutive nonsquarefree numbers (A013929). First differences of A078147.

Original entry on oeis.org

-3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, 3, 0, -1, -2, 3, -3, 2, 1, -2, 0, 2, -2, -1, 0, 3, 0, 0, 0, -3, 2, -2, 2, -2, 0, 1, 2, -1, -2, 3, 0, -1, -2, 1, 0, -1, 2, 1, -2, 0, 2, -3, 1, -1, 2, -2, 3, 0, 0, -3, 2, 1, -2, 0, 2
Offset: 1

Views

Author

Gus Wiseman, Oct 01 2024

Keywords

Comments

The range is {-3, -2, -1, 0, 1, 2, 3}.

Examples

			The nonsquarefree numbers (A013929) are:
  4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, 52, ...
with first differences (A078147):
  4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, 4, 4, ...
with first differences (A376593):
  -3, 2, 1, -2, 0, 2, -3, 1, -1, 3, 0, 0, 0, -3, 2, -2, 0, 1, 0, 0, 2, -1, -2, ...
		

Crossrefs

The version for A000002 is A376604, first differences of A054354.
The first differences were A078147.
Zeros are A376594, complement A376595.
A000040 lists the prime numbers, differences A001223.
A005117 lists squarefree numbers, differences A076259.
A064113 lists positions of adjacent equal prime gaps.
A114374 counts partitions into nonsquarefree numbers.
A246655 lists prime-powers exclusive, inclusive A000961.
A333254 lists run-lengths of differences between consecutive primes.
For second differences: A036263 (prime), A073445 (composite), A376559 (perfect-power), A376562 (non-perfect-power), A376590 (squarefree), A376596 (prime-power inclusive), A376599 (non-prime-power inclusive).
For nonsquarefree numbers: A013929 (terms), A078147 (first differences), A376594 (inflections and undulations), A376595 (nonzero curvature).

Programs

  • Mathematica
    Differences[Select[Range[100],!SquareFreeQ[#]&],2]
  • Python
    from math import isqrt
    from sympy import mobius, factorint
    def A376593(n):
        def f(x): return n+sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        k = next(i for i in range(1,5) if any(d>1 for d in factorint(m+i).values()))
        return next(i for i in range(1-k,5-k) if any(d>1 for d in factorint(m+(k<<1)+i).values())) # Chai Wah Wu, Oct 02 2024

A377049 First term of the n-th differences of the nonsquarefree numbers. Inverse zero-based binomial transform of A013929.

Original entry on oeis.org

4, 4, -3, 5, -6, 4, 3, -15, 25, -10, -84, 369, -1067, 2610, -5824, 12246, -24622, 47577, -88233, 155962, -259086, 393455, -512281, 456609, 191219, -2396571, 8213890, -21761143, 50923029, -110269263, 225991429, -444168664, 844390152, -1561482492, 2817844569
Offset: 0

Views

Author

Gus Wiseman, Oct 19 2024

Keywords

Crossrefs

The version for primes is A007442, noncomposites A030016, composites A377036.
For squarefree instead of nonsquarefree numbers we have A377041.
For antidiagonal-sums we have A377047, absolute A377048.
For first position of 0 in each row we have A377050.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=20;
    Table[First[Differences[NestList[NestWhile[#+1&, #+1,SquareFreeQ[#]&]&,4,2*nn],k]],{k,0,nn}]
    With[{nsf=Select[Range[1000],!SquareFreeQ[#]&]},Table[Differences[nsf,n],{n,0,40}]][[;;,1]] (* Harvey P. Dale, Nov 28 2024 *)

Formula

The inverse zero-based binomial transform of a sequence (q(0), q(1), q(2), ...) is the sequence p given by:
p(j) = sum_{k=0..j} (-1)^(j-k) binomial(j,k) q(k)

A377048 Antidiagonal-sums of the absolute value of the array A377046(n,k) = n-th term of k-th differences of nonsquarefree numbers (A013929).

Original entry on oeis.org

4, 12, 13, 22, 28, 31, 39, 64, 85, 132, 395, 1103, 2650, 5868, 12297, 24694, 47740, 88731, 157744, 265744, 418463, 605929, 805692, 1104513, 2396645, 8213998, 21761334, 50923517, 110270883, 225997492, 444193562, 844498084, 1561942458, 2819780451, 4973173841
Offset: 1

Views

Author

Gus Wiseman, Oct 19 2024

Keywords

Comments

These are the row-sums of the absolute value triangle version of A377046.

Examples

			The third antidiagonal of A377046 is (9, 1, -3), so a(3) = 13.
		

Crossrefs

The version for primes is A376681, noncomposites A376684, composites A377035.
For squarefree instead of nonsquarefree numbers we have A377040.
The non-absolute version is A377047.
For leading column we have A377049.
For first position of 0 in each row we have A377050.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=20;
    t=Table[Take[Differences[NestList[NestWhile[#+1&, #+1,SquareFreeQ[#]&]&,4,2*nn],k],nn],{k,0,nn}];
    Total/@Table[Abs[t[[j,i-j+1]]],{i,nn},{j,i}]

A377047 Antidiagonal-sums of the array A377046(n,k) = n-th term of k-th differences of nonsquarefree numbers (A013929).

Original entry on oeis.org

4, 12, 7, 22, 14, 17, 39, 0, 37, 112, -337, 1103, -2570, 5868, -12201, 24670, -47528, 88283, -155910, 259140, -393399, 512341, -456546, -191155, 2396639, -8213818, 21761218, -50922953, 110269343, -225991348, 444168748, -844390064, 1561482582, -2817844477
Offset: 1

Views

Author

Gus Wiseman, Oct 19 2024

Keywords

Comments

These are the row-sums of the triangle-version of A377046.

Examples

			The third antidiagonal of A377046 is (9, 1, -3), so a(3) = 7.
		

Crossrefs

The version for primes is A140119, noncomposites A376683, composites A377034.
For squarefree instead of nonsquarefree numbers we have A377039.
The absolute value version is A377048.
For leading column we have A377049.
For first position of 0 in each row we have A377050.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers.
A013929 lists the nonsquarefree numbers, differences A078147, seconds A376593.
A073576 counts integer partitions into squarefree numbers, factorizations A050320.

Programs

  • Mathematica
    nn=20;
    t=Table[Take[Differences[NestList[NestWhile[#+1&,#+1,SquareFreeQ[#]&]&,4,2*nn],k],nn],{k,0,nn}];
    Total/@Table[t[[j,i-j+1]],{i,nn},{j,i}]

A376312 Run-compression of first differences (A078147) of nonsquarefree numbers (A013929).

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Sep 24 2024

Keywords

Comments

We define the run-compression of a sequence to be the anti-run obtained by reducing each run of repeated parts to a single part. Alternatively, we can remove all parts equal to the part immediately to their left. For example, (1,1,2,2,1) has run-compression (1,2,1).

Examples

			The sequence of nonsquarefree numbers (A013929) is:
  4, 8, 9, 12, 16, 18, 20, 24, 25, 27, 28, 32, 36, 40, 44, 45, 48, 49, 50, ...
with first differences (A078147):
  4, 1, 3, 4, 2, 2, 4, 1, 2, 1, 4, 4, 4, 4, 1, 3, 1, 1, 2, 2, 2, 4, 3, 1, ...
with runs:
  (4),(1),(3),(4),(2,2),(4),(1),(2),(1),(4,4,4,4),(1),(3),(1,1),(2,2,2), ...
and run-compression (A376312):
  4, 1, 3, 4, 2, 4, 1, 2, 1, 4, 1, 3, 1, 2, 4, 3, 1, 4, 3, 1, 4, 1, 3, 4, ...
		

Crossrefs

For nonprime instead of squarefree numbers we have A037201, halved A373947.
Before compressing we had A078147.
For run-sums instead of compression we have A376264.
For squarefree instead of nonsquarefree we have A376305, ones A376342.
For prime-powers instead of nonsquarefree numbers we have A376308.
A000040 lists the prime numbers, differences A001223.
A000961 and A246655 list prime-powers, differences A057820.
A003242 counts compressed compositions, ranks A333489.
A005117 lists squarefree numbers, differences A076259 (ones A375927).
A013929 lists nonsquarefree numbers, differences A078147.
A116861 counts partitions by compressed sum, by compressed length A116608.

Programs

  • Mathematica
    First/@Split[Differences[Select[Range[100], !SquareFreeQ[#]&]]]

A243343 a(1)=1; thereafter, if n is the k-th squarefree number (i.e., n = A005117(k)), a(n) = 1 + (2*a(k-1)); otherwise, when n is k-th nonsquarefree number (i.e., n = A013929(k)), a(n) = 2*a(k).

Original entry on oeis.org

1, 3, 7, 2, 15, 5, 31, 6, 14, 11, 63, 4, 13, 29, 23, 30, 127, 10, 9, 62, 27, 59, 47, 12, 28, 61, 22, 126, 255, 21, 19, 8, 125, 55, 119, 26, 95, 25, 57, 58, 123, 45, 253, 46, 60, 511, 43, 254, 20, 18, 39, 124, 17, 54, 251, 118, 111, 239, 53, 94, 191, 51, 24, 56
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This is an instance of an "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A005117/A013929 (numbers which are squarefree/not squarefree) is entangled with complementary pair odd/even numbers (A005408/A005843).
Thus this shares with permutation A243352 the property that each term of A005117 is mapped bijectively to a unique odd number and likewise each term of A013929 is mapped (bijectively) to a unique even number. However, instead of placing terms into those positions in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself.
Are there any other fixed points than 1, 13, 54, 120, 1389, 3183, ... ?

Crossrefs

Formula

a(1) = 1; thereafter, if A008966(n) = 0 (i.e., n is a term of A013929, not squarefree), a(n) = 2*a(A057627(n)); otherwise a(n) = 2*a(A013928(n+1)-1)+1 (where A057627 and A013928(n+1) give the number of integers <= n divisible/not divisible by a square greater than one).
For all n, A000035(a(n)) = A008966(n) = A008683(n)^2, or equally, a(n) = mu(n) modulo 2. The same property holds for A243352.

A243346 a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A013929(a(n)), where A005117 are squarefree and A013929 are nonsquarefree numbers.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 12, 5, 9, 13, 24, 10, 18, 19, 32, 7, 16, 14, 25, 21, 36, 38, 63, 15, 27, 30, 49, 31, 50, 53, 84, 11, 20, 26, 45, 22, 40, 39, 64, 34, 54, 59, 96, 62, 99, 103, 162, 23, 44, 42, 72, 47, 80, 79, 126, 51, 81, 82, 128, 86, 136, 138, 220, 17, 28, 33, 52, 41, 68, 73, 120
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

This permutation entangles complementary pair A005843/A005408 (even/odd numbers) with complementary pair A005117/A013929 (numbers which are squarefree/are not squarefree).

Crossrefs

Formula

a(1) = 1, a(2n) = A005117(1+a(n)), a(2n+1) = A013929(a(n)).
For all n > 1, A008966(a(n)) = A000035(n+1), or equally, mu(a(n)) + 1 = n modulo 2, where mu is Moebius mu (A008683). [A property shared with a simpler variant A075378].

A375709 Numbers k such that A013929(k+1) = A013929(k) + 1. In other words, the k-th nonsquarefree number is 1 less than the next nonsquarefree number.

Original entry on oeis.org

2, 8, 10, 15, 17, 18, 24, 28, 30, 37, 38, 43, 45, 47, 48, 52, 56, 59, 65, 67, 69, 73, 80, 85, 92, 93, 94, 100, 106, 108, 111, 115, 122, 125, 128, 133, 134, 137, 138, 141, 143, 145, 148, 153, 158, 165, 166, 171, 178, 183, 184, 192, 196, 198, 203, 205, 207, 210
Offset: 1

Views

Author

Gus Wiseman, Sep 01 2024

Keywords

Comments

The difference of consecutive nonsquarefree numbers is at least 1 and at most 4, so there are four disjoint sequences of this type:
- A375709 (difference 1) (this)
- A375710 (difference 2)
- A375711 (difference 3)
- A375712 (difference 4)

Examples

			The initial nonsquarefree numbers are 4, 8, 9, 12, 16, 18, 20, 24, 25, which first increase by one after the 2nd and 8th terms.
		

Crossrefs

Positions of 1's in A078147.
For prime-powers (A246655) we have A375734.
First differences are A373409.
For prime numbers we have A375926.
For squarefree instead of nonsquarefree we have A375927.
A005117 lists the squarefree numbers, first differences A076259.
A013929 lists the nonsquarefree numbers, first differences A078147.
A053797 gives lengths of runs of nonsquarefree numbers, firsts A373199.
A375707 counts squarefree numbers between consecutive nonsquarefree numbers.

Programs

  • Mathematica
    Join@@Position[Differences[Select[Range[100],!SquareFreeQ[#]&]],1]

Formula

Complement of A375710 U A375711 U A375712.

A243347 a(1)=1, and for n>1, if mu(n) = 0, a(n) = A005117(1+a(A057627(n))), otherwise, a(n) = A013929(a(A013928(n))).

Original entry on oeis.org

1, 4, 12, 2, 32, 8, 84, 6, 19, 24, 220, 3, 18, 50, 63, 53, 564, 13, 9, 138, 49, 128, 162, 10, 31, 136, 38, 365, 1448, 36, 25, 5, 351, 126, 332, 30, 414, 27, 81, 82, 348, 99, 931, 103, 86, 3699, 96, 929, 21, 14, 64, 223, 16, 79, 892, 210, 325, 847, 80, 265, 1056, 72, 15, 51, 208, 212, 884, 221, 256
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2014

Keywords

Comments

Self-inverse permutation of natural numbers.
Shares with A088609 the property that after 1, positions indexed by squarefree numbers larger than one, A005117(n+1): 2, 3, 5, 6, 7, 10, 11, 13, 14, ... contain only nonsquarefree numbers A013929: 4, 8, 9, 12, 16, 18, 20, 24, ..., and vice versa. However, instead of placing terms in those subsets in monotone order this sequence recursively permutes the order of both subsets with the emerging permutation itself, thus implementing a kind of "deep" variant of A088609. Alternatively, this can be viewed as yet another "entanglement permutation", where two pairs of complementary subsets of natural numbers are interwoven with each other. In this case complementary pair A005117/A013929 is entangled with complementary pair A013929/A005117.

Crossrefs

Formula

a(1), and for n>1, if mu(n) = 0, a(n) = A005117(1+a(A057627(n))), otherwise, a(n) = A013929(a(A013928(n))). [Here mu is Moebius mu-function, A008683, which is zero only when n is a nonsquarefree number, one of the numbers in A013929.]
For all n > 1, A008966(a(n)) = 1 - A008966(n), or equally, mu(a(n)) + 1 = mu(n) modulo 2, where mu is Moebius mu (A008683). [Note: Permutation A088609 satisfies the same condition.]
Showing 1-10 of 609 results. Next