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 2010 results. Next

A206778 Irregular triangle in which n-th row lists squarefree divisors (A005117) of n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 3, 6, 1, 7, 1, 2, 1, 3, 1, 2, 5, 10, 1, 11, 1, 2, 3, 6, 1, 13, 1, 2, 7, 14, 1, 3, 5, 15, 1, 2, 1, 17, 1, 2, 3, 6, 1, 19, 1, 2, 5, 10, 1, 3, 7, 21, 1, 2, 11, 22, 1, 23, 1, 2, 3, 6, 1, 5, 1, 2, 13, 26, 1, 3, 1, 2, 7, 14, 1, 29
Offset: 1

Views

Author

Reinhard Zumkeller, Feb 12 2012

Keywords

Examples

			Triangle begins:
.   1: [1]
.   2: [1, 2]
.   3: [1, 3]
.   4: [1, 2]
.   5: [1, 5]
.   6: [1, 2, 3, 6]
.   7: [1, 7]
.   8: [1, 2]
.   9: [1, 3]
.  10: [1, 2, 5, 10]
.  11: [1, 11]
.  12: [1, 2, 3, 6].
		

Crossrefs

Cf. A008966, A034444 (row lengths), A048250 (row sums), A206787; A077610.

Programs

  • Haskell
    a206778 n k = a206778_row n !! k
    a206778_row = filter ((== 1) . a008966) . a027750_row
    a206778_tabf = map a206778_row [1..]
    -- Reinhard Zumkeller, May 03 2013, Feb 12 2012
    
  • Maple
    A206778 := proc(n)
        local sqdvs ,nfac,d;
        sqdvs := {} ;
        nfac := ifactors(n)[2] ;
        for d in numtheory[divisors](n) do
            if issqrfree(d) then
                sqdvs := sqdvs union {d} ;
            end if;
        end do:
        sort(sqdvs) ;
    end proc:
    seq(op(A206778(n)),n=1..10) ; # R. J. Mathar, Mar 06 2023
  • Mathematica
    Flatten[Table[Select[Divisors[n],SquareFreeQ],{n,30}]] (* Harvey P. Dale, Apr 11 2012 *)
  • PARI
    row(n) = select(x -> issquarefree(x), divisors(n)); \\ Amiram Eldar, May 02 2025

A285328 a(n) = 1 if n is squarefree (A005117), otherwise a(n) = Max {m < n | same prime factors as n, ignoring multiplicity}.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 3, 1, 1, 6, 1, 1, 1, 8, 1, 12, 1, 10, 1, 1, 1, 18, 5, 1, 9, 14, 1, 1, 1, 16, 1, 1, 1, 24, 1, 1, 1, 20, 1, 1, 1, 22, 15, 1, 1, 36, 7, 40, 1, 26, 1, 48, 1, 28, 1, 1, 1, 30, 1, 1, 21, 32, 1, 1, 1, 34, 1, 1, 1, 54, 1, 1, 45, 38, 1, 1, 1, 50, 27, 1, 1, 42, 1, 1, 1, 44, 1, 60, 1, 46, 1, 1, 1, 72, 1, 56, 33, 80, 1, 1, 1, 52, 1, 1, 1, 96
Offset: 1

Views

Author

Antti Karttunen, Apr 17 2017

Keywords

Examples

			From _Michael De Vlieger_, Dec 31 2018: (Start)
a(1) = 1 since 1 is squarefree.
a(2) = 1 since 2 is squarefree.
a(4) = 2 since 4 is not squarefree and 2 is the largest number less than 4 that has all the distinct prime divisors that 4 has.
a(6) = 1 since 6 is squarefree.
a(12) = 6 since 12 is not squarefree and 6 is the largest number less than 12 that has all the distinct prime divisors that 12 has. (6 is also the squarefree root of 12).
a(16) = 8 since 16 is not squarefree and 8 is the largest number less than 16 that has all the distinct prime divisors that 16 has.
a(18) = 12 since 18 is not squarefree and 12 is the largest number less than 18 that has all the distinct prime divisors that 18 has.
(End)
		

Crossrefs

A left inverse of A065642.
Cf. also A079277.

Programs

  • Mathematica
    Table[With[{r = DivisorSum[n, EulerPhi[#] Abs@ MoebiusMu[#] &]}, If[MoebiusMu@ n != 0, 1, SelectFirst[Range[n - 2, 2, -1], DivisorSum[#, EulerPhi[#] Abs@ MoebiusMu[#] &] == r &]]], {n, 108}] (* Michael De Vlieger, Dec 31 2018 *)
  • PARI
    A007947(n) = factorback(factorint(n)[, 1]); \\ From Andrew Lelechenko, May 09 2014
    A285328(n) = { my(r=A007947(n)); if(core(n)==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n); }; \\ After Python-code below - Antti Karttunen, Apr 17 2017
    A285328(n) = { my(r); if((n > 1 && !bitand(n,(n-1))),(n/2), r=A007947(n); if(r==n,1,n = n-r; while(A007947(n) <> r, n = n-r); n)); }; \\ Version optimized for powers of 2.
    
  • Python
    from operator import mul
    from sympy import primefactors
    from sympy.ntheory.factor_ import core
    def a007947(n): return 1 if n<2 else reduce(mul, primefactors(n))
    def a(n):
        if core(n) == n: return 1
        r = a007947(n)
        k = n - r
        while k>0:
            if a007947(k) == r: return k
            else: k -= r
    print([a(n) for n in range(1, 121)]) # Indranil Ghosh and Antti Karttunen, Apr 17 2017
  • Scheme
    (definec (A285328 n) (if (not (zero? (A008683 n))) 1 (let ((k (A007947 n))) (let loop ((n (- n k))) (if (= (A007947 n) k) n (loop (- n k)))))))
    

Formula

If A008683(n) <> 0, a(n) = 1, otherwise a(n) = the largest number k < n for which A007947(k) = A007947(n).
Other identities. For all n >= 1:
a(A065642(n)) = n.

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.

A377040 Antidiagonal-sums of absolute value of the array A377038(n,k) = n-th term of k-th differences of squarefree numbers (A005117).

Original entry on oeis.org

1, 3, 4, 9, 13, 18, 28, 39, 106, 267, 595, 1212, 2286, 4041, 6720, 10497, 15387, 20914, 25894, 29377, 37980, 70785, 175737, 343806, 579751, 861934, 1162080, 1431880, 1688435, 2589533, 8731932, 23911101, 58109574, 130912573, 276067892, 543833014, 992784443
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Examples

			The fourth antidiagonal of A377038 is (6, 1, -1, -2, -3), so a(4) = 13.
		

Crossrefs

The version for primes is A376681, noncomposites A376684, composites A377035.
These are the antidiagonal-sums of the absolute value of A377038.
The non-absolute version is A377039.
For nonsquarefree numbers we have A377048, non-absolute A377047.
For prime-powers we have A377053, non-absolute A377052.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.
A377041 gives first column of A377038, for primes A007442 or A030016.
A377042 gives first position of 0 in each row of A377038.

Programs

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

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].

A328248 a(n) = 1 if n is a squarefree number (A005117), otherwise a(n) = 1 + number of iterations of arithmetic derivative (A003415) needed to reach a squarefree number, or 0 if no such number is ever reached.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 11 2019

Keywords

Examples

			For n = 9, it itself is not a squarefree number, while its arithmetic derivative A003415(9) = 6 is, so it took just one iteration to find a squarefree number, thus a(9) = 1+1 = 2.
For n = 50, which is not squarefree, and its first derivative A003415(50) = 45 also is not squarefree, but taking derivative yet again, gives A003415(45) = 39 = 3*13, which is squarefree, thus a(50) = 2+1 = 3.
		

Crossrefs

Cf. A328251, A005117, A328252, A328253 (indices of terms k=0, 1, 2, 3).

Programs

  • PARI
    A003415checked(n) = if(n<=1, 0, my(f=factor(n), s=0); for(i=1, #f~, if(f[i,2]>=f[i,1],return(0), s += f[i, 2]/f[i, 1])); (n*s));
    A328248(n) = { my(k=1); while(n && !issquarefree(n), k++; n = A003415checked(n)); (!!n*k); };

Formula

a(4*n) = a(27*n) = 0 and in general, a(m * p^p) = 0, for any m >= 1 and any prime p.

A376592 Points of nonzero curvature in the sequence of squarefree numbers (A005117).

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 13, 15, 17, 19, 20, 22, 23, 25, 26, 28, 29, 30, 31, 34, 36, 37, 38, 39, 41, 42, 44, 45, 46, 47, 49, 50, 51, 52, 54, 57, 59, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 74, 75, 76, 77, 78, 80, 81, 82, 83, 85, 86, 88, 89, 90, 91, 92, 93, 94, 95
Offset: 1

Views

Author

Gus Wiseman, Oct 04 2024

Keywords

Comments

These are points at which the second differences (A376590) are nonzero.

Examples

			The squarefree numbers (A005117) are:
  1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, ...
with first differences (A076259):
  1, 1, 2, 1, 1, 3, 1, 2, 1, 1, 2, 2, 2, 1, 1, 3, 3, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, ...
with first differences (A376590):
  0, 1, -1, 0, 2, -2, 1, -1, 0, 1, 0, 0, -1, 0, 2, 0, -2, 0, 1, -1, 0, 1, -1, 0, 1, ...
with nonzeros at (A376591):
  2, 3, 5, 6, 7, 8, 10, 13, 15, 17, 19, 20, 22, 23, 25, 26, 28, 29, 30, 31, 34, 36, ...
		

Crossrefs

The first differences were A076259, see also A375927, A376305, A376306, A376307, A376311.
These are the nonzeros of A376590.
The complement is A376591.
A000040 lists the prime numbers, differences A001223.
A005117 lists squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.
For points of nonzero curvature: A333214 (prime), A376603 (composite), A376589 (non-perfect-power), A376595 (nonsquarefree), A376598 (prime-power), A376601 (non-prime-power).
For squarefree numbers: A076259 (first differences), A376590 (second differences), A376591 (inflection and undulation points).

Programs

  • Mathematica
    Join@@Position[Sign[Differences[Select[Range[100], SquareFreeQ],2]],1|-1]

A377039 Antidiagonal-sums of the array A377038(n,k) = n-th term of k-th differences of squarefree numbers (A005117).

Original entry on oeis.org

1, 3, 4, 9, 1, 18, 8, -9, 106, -237, 595, -1170, 2276, -3969, 6640, -10219, 14655, -18636, 19666, -12071, -13056, 69157, -171441, 332756, -552099, 798670, -982472, 901528, -116173, -2351795, 8715186, -23856153, 57926066, -130281007, 273804642, -535390274
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Comments

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

Examples

			The fourth antidiagonal of A377038 is (6,1,-1,-2,-3), so a(4) = 1.
		

Crossrefs

The version for primes is A140119, noncomposites A376683, composites A377034.
These are the antidiagonal-sums of A377038.
The absolute version is A377040.
For nonsquarefree numbers we have A377047.
For prime-powers we have A377052.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.
A377041 gives first column of A377038, for primes A007442 or A030016.
A377042 gives first position of 0 in each row of A377038.

Programs

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

A377042 Position of first zero in the n-th differences of the squarefree numbers (A005117), or 0 if it does not appear.

Original entry on oeis.org

0, 0, 1, 11, 8, 57, 14, 11, 13, 1019, 44, 1250, 43, 2721, 42, 249522, 2840, 1989839, 2839, 3373774, 4933, 142715511, 42793, 435650856, 5266, 30119361, 104063, 454172978707, 100285, 434562125244, 2755089, 2409925829164, 2485612
Offset: 0

Views

Author

Gus Wiseman, Oct 18 2024

Keywords

Comments

a(n) for n even appear to be smaller than a(n) for n odd. - Chai Wah Wu, Oct 19 2024
a(33) > 10^13, unless it is 0. - Lucas A. Brown, Nov 15 2024

Examples

			The fourth differences begin: -3, 3, 1, -6, 7, -5, 3, 0, -2, ... so a(4) = 8
		

Crossrefs

The version for primes is A376678, noncomposites A376855, composites A377037.
This is the first position of 0 in each row of A377038.
For nonsquarefree numbers we have A377050.
For prime-powers we have A377055.
A000040 lists the primes, differences A001223, seconds A036263.
A005117 lists the squarefree numbers, complement A013929 (differences A078147).
A073576 counts integer partitions into squarefree numbers, factorizations A050320.
A377039 gives antidiagonal-sums of A377038, absolute version A377040.
A377041 gives first column of A377038, for primes A007442 or A030016.

Programs

  • Mathematica
    nn=10000;
    u=Table[Differences[Select[Range[nn],SquareFreeQ],k],{k,2,16}];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    m=Table[Position[u[[k]],0][[1,1]],{k,mnrm[Union[First/@Position[u,0]]]}]

Extensions

a(15)-a(20) from Chai Wah Wu, Oct 19 2024
a(21)-a(32) from Lucas A. Brown, Nov 15 2024

A220072 Least prime p such that sum_{k=0}^n A005117(k+1)*x^{n-k} is irreducible modulo p.

Original entry on oeis.org

2, 5, 2, 7, 11, 31, 13, 19, 89, 17, 37, 37, 43, 19, 137, 29, 3, 7, 2, 19, 13, 59, 139, 37, 2, 239, 31, 337, 487, 97, 337, 97, 307, 181, 223, 19, 79, 401, 2, 491, 269, 211, 97, 193, 719, 149, 97, 191, 83, 613
Offset: 1

Views

Author

Zhi-Wei Sun, Mar 28 2013

Keywords

Comments

Conjecture: For any n>0, we have a(n) <= n*(n+1), and the Galois group of SF_n(x) = sum_{k=0}^n A005117(k+1)*x^{n-k} over the rationals is isomorphic to the symmetric group S_n.
For another related conjecture, see the author's comment on A005117.

Examples

			a(4)=7 since SF_4(x)=x^4+2x^3+3x^2+5x+6 is irreducible modulo 7 but reducible modulo any of 2, 3, 5. It is easy to check that SF_4(x)==(x-2)*(x^3-x^2+x+2) (mod 5).
		

Crossrefs

Previous Showing 11-20 of 2010 results. Next