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

A325568 a(1) = 0; for n > 1, a(n) = 1 + a(A325567(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 09 2019

Keywords

Crossrefs

Programs

Formula

a(1) = 0; for n > 1, a(n) = 1 + a(A325567(n)).
a(n) <= A001222(n) for all n.

A379126 a(1) = 1; for n > 1, a(n) is the least number k such that A325567(k) = n, or 0 if no such number exists.

Original entry on oeis.org

1, 4, 9, 8, 35, 18, 49, 16, 135, 70, 33, 36, 65, 98, 225, 32, 527, 270, 133, 140, 651, 66, 161, 72, 775, 130, 837, 196, 899, 450, 961, 64, 2079, 1054, 525, 540, 259, 266, 273, 280, 2583, 1302, 129, 132, 2835, 322, 705, 144, 3087, 1550, 3213, 260, 3339, 1674, 385, 392, 1539, 1798, 3717, 900, 3843, 1922, 3969, 128
Offset: 1

Views

Author

Antti Karttunen, Dec 21 2024

Keywords

Comments

By definition, sequence is injective (apart from possible 0's) and each a(n) is a multiple of n.

Crossrefs

Cf. A048720, A065621, A277320, A325567, A379128 (odd bisection), A379228 [= a(n)/n].
Cf. also A115872, A266195, A266351.

Programs

  • PARI
    A048720(b, c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1, n+n-1);
    memoA325567 = Map();
    A325567(n) = if(1==n,1,my(v); if(mapisdefined(memoA325567,n,&v), v, fordiv(n, d, if((d>1)&&A048720(A065621(n/d), d)==n, v = (n/d); break)); mapput(memoA325567,n,v); (v)));
    A379126(n) = for(k=1,oo,if(A325567(k)==n, return(k)));

Formula

a(n) = n * A379228(n).

A379128 a(1) = 1; for n > 1, a(n) is the least odd number k such that A325567(k) = 2*n-1, or 0 if no such number exists.

Original entry on oeis.org

1, 9, 35, 49, 135, 33, 65, 225, 527, 133, 651, 161, 775, 837, 899, 961, 2079, 525, 259, 273, 2583, 129, 2835, 705, 3087, 3213, 3339, 385, 1539, 3717, 3843, 3969, 8255, 2077, 1035, 1065, 9271, 2325, 1155, 1185, 4131, 2573, 10795, 2697, 11303, 2821, 11811, 2945, 12319, 12573, 12827, 1545, 13335, 13589, 13843, 1665
Offset: 1

Views

Author

Antti Karttunen, Dec 21 2024

Keywords

Crossrefs

Odd bisection of A379126.

Programs

Formula

a(n) = A379126(2*n-1).

A032742 a(1) = 1; for n > 1, a(n) = largest proper divisor of n (that is, for n>1, maximum divisor d of n in range 1 <= d < n).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 7, 11, 1, 12, 5, 13, 9, 14, 1, 15, 1, 16, 11, 17, 7, 18, 1, 19, 13, 20, 1, 21, 1, 22, 15, 23, 1, 24, 7, 25, 17, 26, 1, 27, 11, 28, 19, 29, 1, 30, 1, 31, 21, 32, 13, 33, 1, 34, 23, 35, 1, 36, 1, 37, 25, 38, 11, 39, 1, 40
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

It seems that a(n) = Max_{j=n+1..2n-1} gcd(n,j). - Labos Elemer, May 22 2002
This is correct: No integer in the range [n+1, 2n-1] has n as its divisor, but certainly at least one multiple of the largest proper divisor of n will occur there (e.g., if it is n/2, then at n + (n/2)). - Antti Karttunen, Dec 18 2014
The slopes of the visible lines made by the points in the scatter plot are 1/2, 1/3, 1/5, 1/7, ... (reciprocals of primes). - Moosa Nasir, Jun 19 2022

Crossrefs

Maximal GCD of k positive integers with sum n for k = 2..10: this sequence (k=2,n>=2), A355249 (k=3), A355319 (k=4), A355366 (k=5), A355368 (k=6), A355402 (k=7), A354598 (k=8), A354599 (k=9), A354601 (k=10).

Programs

  • Haskell
    a032742 n = n `div` a020639 n  -- Reinhard Zumkeller, Oct 03 2012
    
  • Maple
    A032742 :=proc(n) option remember; if n = 1 then 1; else numtheory[divisors](n) minus {n} ; max(op(%)) ; end if; end proc: # R. J. Mathar, Jun 13 2011
    1, seq(n/min(numtheory:-factorset(n)), n=2..1000); # Robert Israel, Dec 18 2014
  • Mathematica
    f[n_] := If[n == 1, 1, Divisors[n][[-2]]]; Table[f[n], {n, 100}] (* Vladimir Joseph Stephan Orlovsky, Mar 03 2010 *)
    Join[{1},Divisors[#][[-2]]&/@Range[2,80]] (* Harvey P. Dale, Nov 29 2011 *)
    a[n_] := n/FactorInteger[n][[1, 1]]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
    Table[Which[n==1,1,PrimeQ[n],1,True,Divisors[n][[-2]]],{n,80}] (* Harvey P. Dale, Feb 02 2022 *)
  • PARI
    a(n)=if(n==1,1,n/factor(n)[1,1]) \\ Charles R Greathouse IV, Jun 15 2011
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else n//min(factorint(n))
    print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Jun 21 2022
  • Scheme
    (define (A032742 n) (/ n (A020639 n))) ;; Antti Karttunen, Dec 18 2014
    

Formula

a(n) = n / A020639(n).
Other identities and observations:
A054576(n) = a(a(n)); A117358(n) = a(a(a(n))) = a(A054576(n)); a(A008578(n)) = 1, a(A002808(n)) > 1. - Reinhard Zumkeller, Mar 10 2006
a(n) = A130064(n) / A006530(n). - Reinhard Zumkeller, May 05 2007
a(m)*a(n) < a(m*n) for m and n > 1. - Reinhard Zumkeller, Apr 11 2008
a(m*n) = max(m*a(n), n*a(m)). - Robert Israel, Dec 18 2014
From Antti Karttunen, Mar 31 2018: (Start)
a(n) = n - A060681(n).
For n > 1, a(n) = A003961^(r)(A246277(n)), where r = A055396(n)-1 and A003961^(r)(n) stands for shifting the prime factorization of n by r positions towards larger primes.
For all n >= 1, A276085(a(A276086(n))) = A276151(n).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - Amiram Eldar, Nov 19 2022

Extensions

Definition clarified by N. J. A. Sloane, Dec 26 2022

A115872 Square array where row n gives all solutions k > 0 to the cross-domain congruence n*k = A048720(A065621(n),k), zero sequence (A000004) if no such solutions exist.

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 4, 3, 6, 1, 5, 4, 7, 2, 7, 6, 5, 12, 3, 14, 3, 7, 6, 14, 4, 15, 6, 7, 8, 7, 15, 5, 28, 7, 14, 1, 9, 8, 24, 6, 30, 12, 15, 2, 15, 10, 9, 28, 7, 31, 14, 28, 3, 30, 7, 11, 10, 30, 8, 56, 15, 30, 4, 31, 14, 3, 12, 11, 31, 9, 60, 24, 31, 5, 60, 15, 6, 3, 13, 12, 48, 10, 62, 28, 56, 6, 62, 28, 12, 6, 5, 14, 13, 51, 11, 63, 30, 60, 7, 63, 30, 15, 7, 10, 7
Offset: 1

Views

Author

Antti Karttunen, Feb 07 2006

Keywords

Comments

Here * stands for ordinary multiplication and X means carryless (GF(2)[X]) multiplication (A048720).
Square array is read by descending antidiagonals, as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
Rows at positions 2^k are 1, 2, 3, ..., (A000027). Row 2n is equal to row n.
Numbers on each row give a subset of positions of zeros at the corresponding row of A284270. - Antti Karttunen, May 08 2019

Examples

			Fifteen initial terms of rows 1 - 19 are listed below:
   1:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   2:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   3:  3,  6,  7,  12,  14,  15,  24,  28,  30,  31,  48,  51,  56,  60,  62, ...
   4:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   5:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
   6:  3,  6,  7,  12,  14,  15,  24,  28,  30,  31,  48,  51,  56,  60,  62, ...
   7:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
   8:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
   9: 15, 30, 31,  60,  62,  63, 120, 124, 126, 127, 240, 248, 252, 254, 255, ...
  10:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
  11:  3,  6, 12,  15,  24,  27,  30,  31,  48,  51,  54,  60,  62,  63,  96, ...
  12:  3,  6,  7,  12,  14,  15,  24,  28,  30,  31,  48,  51,  56,  60,  62, ...
  13:  5, 10, 15,  20,  21,  30,  31,  40,  42,  45,  47,  60,  61,  62,  63, ...
  14:  7, 14, 15,  28,  30,  31,  56,  60,  62,  63, 112, 120, 124, 126, 127, ...
  15: 15, 30, 31,  60,  62,  63, 120, 124, 126, 127, 240, 248, 252, 254, 255, ...
  16:  1,  2,  3,   4,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15, ...
  17: 31, 62, 63, 124, 126, 127, 248, 252, 254, 255, 496, 504, 508, 510, 511, ...
  18: 15, 30, 31,  60,  62,  63, 120, 124, 126, 127, 240, 248, 252, 254, 255, ...
  19:  7, 14, 28,  31,  56,  62,  63, 112, 119, 124, 126, 127, 224, 238, 248, ...
		

Crossrefs

Transpose: A114388. First column: A115873.
Cf. also arrays A277320, A277810, A277820, A284270.
A few odd-positioned rows: row 1: A000027, Row 3: A048717, Row 5: A115770 (? Checked for all values less than 2^20), Row 7: A115770, Row 9: A115801, Row 11: A115803, Row 13: A115772, Row 15: A115801 (? Checked for all values less than 2^20), Row 17: A115809, Row 19: A115874, Row 49: A114384, Row 57: A114386.

Programs

  • Mathematica
    X[a_, b_] := Module[{A, B, C, x},
         A = Reverse@IntegerDigits[a, 2];
         B = Reverse@IntegerDigits[b, 2];
         C = Expand[
            Sum[A[[i]]*x^(i-1), {i, 1, Length[A]}]*
            Sum[B[[i]]*x^(i-1), {i, 1, Length[B]}]];
         PolynomialMod[C, 2] /. x -> 2];
    T[n_, k_] := Module[{x = BitXor[n-1, 2n-1], k0 = k},
         For[i = 1, True, i++, If[n*i == X[x, i],
         If[k0 == 1, Return[i], k0--]]]];
    Table[T[n-k+1, k], {n, 1, 14}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Jan 04 2022 *)
  • PARI
    up_to = 120;
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1,n+n-1);
    A115872sq(n, k) = { my(x = A065621(n)); for(i=1,oo,if((n*i)==A048720(x,i),if(1==k,return(i),k--))); };
    A115872list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A115872sq(col,(a-(col-1))))); (v); };
    v115872 = A115872list(up_to);
    A115872(n) = v115872[n]; \\ (Slow) - Antti Karttunen, May 08 2019

Extensions

Example section added and the data section extended up to n=105 by Antti Karttunen, May 08 2019

A325565 a(n) is the number of such divisors d of n that A048720(A065621(d),n/d) is equal to n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 09 2019

Keywords

Comments

Equally, a(n) is number of such pairs of natural numbers t, u that A048720(t,u) = n and A065620(t)*u = n.

Crossrefs

Programs

  • PARI
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1,n+n-1);
    A325565(n) = sumdiv(n,d,A048720(A065621(d),n/d)==n);
    
  • PARI
    A065620(n, c=1) = sum(i=0, logint(n+!n, 2), if(bittest(n, i), (-1)^c++<A065620
    A325565(n) = { my(p = Pol(binary(n))*Mod(1, 2)); sum(d=1,n,my(q = Pol(binary(d))*Mod(1, 2)); (0==(p%q) && (n==(A065620(d)*fromdigits(Vec(lift(p/q)),2))))); };

Formula

a(n) = Sum_{d|n} [A048720(A065621(d),n/d) == n], where [ ] is the Iverson bracket.
a(n) / a(A000265(n)) = A001511(n).
a(n) <= A000005(n) for all n.
a(n) <= A091220(n) for all n.

A379113 a(1) = 1; for n > 1, a(n) is the greatest proper unitary divisor d of n such that A048720(A065621(sigma(d)),sigma(n/d)) is equal to sigma(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 7, 3, 1, 1, 1, 1, 5, 7, 11, 1, 3, 1, 2, 1, 7, 1, 15, 1, 1, 3, 1, 7, 1, 1, 1, 3, 5, 1, 21, 1, 11, 1, 23, 1, 3, 1, 2, 3, 13, 1, 1, 11, 7, 3, 2, 1, 15, 1, 31, 7, 1, 5, 33, 1, 1, 3, 35, 1, 9, 1, 1, 3, 19, 7, 6, 1, 5, 1, 1, 1, 21, 1, 43, 3, 11, 1, 1, 7, 23, 31, 47, 1, 3, 1, 1, 1, 4, 1
Offset: 1

Views

Author

Antti Karttunen, Dec 17 2024

Keywords

Crossrefs

Cf. A000203, A048720, A065621, A379114 (positions of terms > 1), A379119.
Cf. also A325567.

Programs

  • PARI
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1,n+n-1);
    A379113(n) = if(1==n,n,my(s=sigma(n)); fordiv(n,d,if((d>1) && 1==gcd(d,n/d) && A048720(A065621(sigma(n/d)),sigma(d))==s,return(n/d))));

Formula

a(n) = n/A379119(n).

A325566 a(n) is the largest divisor d of n such that A048720(A065621(d),n/d) = n.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 4, 1, 2, 1, 16, 1, 6, 1, 4, 3, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 32, 11, 2, 5, 12, 1, 2, 1, 8, 1, 6, 1, 4, 3, 2, 1, 16, 7, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 64, 13, 22, 1, 4, 1, 10, 1, 24, 1, 2, 5, 4, 1, 2, 1, 16, 1, 2, 1, 12, 1, 2, 1, 8, 1, 6, 1, 4, 3, 2, 1, 32, 1, 14, 1, 4, 1, 2, 1, 8, 7
Offset: 1

Views

Author

Antti Karttunen, May 09 2019

Keywords

Crossrefs

Cf. A048720, A065621, A325565, A325567, A325570 (positions of ones).

Programs

  • PARI
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A065621(n) = bitxor(n-1,n+n-1);
    A325566(n) = fordiv(n,d,if(A048720(A065621(n/d),d)==n,return(n/d)));

A325563 a(1) = 1; for n > 1, a(n) is the largest proper divisor d of n such that A048720(d,k) = n for some k.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 7, 11, 1, 12, 1, 13, 9, 14, 1, 15, 1, 16, 3, 17, 7, 18, 1, 19, 3, 20, 1, 21, 1, 22, 15, 23, 1, 24, 7, 25, 17, 26, 1, 27, 1, 28, 3, 29, 1, 30, 1, 31, 21, 32, 5, 33, 1, 34, 1, 35, 1, 36, 1, 37, 15, 38, 1, 39, 1, 40, 1, 41, 1, 42, 17, 43, 1, 44, 1, 45, 1, 46, 31, 47, 19, 48, 1, 49, 33, 50
Offset: 1

Views

Author

Antti Karttunen, May 11 2019

Keywords

Comments

For n > 1, a(n) is the largest proper divisor d of n for which it holds that when the binary expansion of d is converted to a (0,1)-polynomial (e.g., 13=1101[2] encodes X^3 + X^2 + 1), then that polynomial is a divisor of (0,1)-polynomial similarly converted from n, when the polynomial division is done over field GF(2). See the example.

Examples

			For n = 39 = 3*13, A032742(39) = 13, but 13 is not the answer because X^3 + X^2 + 1 does not divide X^5 + X^2 + X + 1 (39 is "100111" in binary) over GF(2). However, the next smaller divisor 3 works because X^5 + X^2 + X + 1 = (X^1 + 1)(X^4 + X^3 + X^2 + 1) when multiplication is done over GF(2). Note that 39 = A048720(3,29), where 29 is "11101" in binary. Thus a(39) = 3.
		

Crossrefs

Cf. A325559 (positions of ones, after the initial 1).

Programs

  • PARI
    A325563(n) = if(1==n,n, my(p = Pol(binary(n))*Mod(1, 2)); fordiv(n,d,if((d>1),my(q = Pol(binary(n/d))*Mod(1, 2)); if(0==(p%q), return(n/d)))));
    
  • PARI
    A048720(b,c) = fromdigits(Vec(Pol(binary(b))*Pol(binary(c)))%2, 2);
    A325563(n) = if(1==n,n,fordiv(n,d,if((d>1),for(t=1,n,if(A048720(n/d,t)==n,return(n/d)))))); \\ (Slow)

Formula

For all n, a(n) <= A032742(n).

A325569 Numbers n for which A325565(n) < A325568(n).

Original entry on oeis.org

135, 279, 525, 567, 651, 1143, 1323, 2079, 2205, 2295, 2667, 2835, 3087, 4123, 4165, 4185, 4191, 4445, 4599, 5355, 5715, 6223, 8211, 8255, 8370, 8415, 8505, 8925, 9207, 9359, 9765, 10731, 11475, 11811, 12397, 12495, 13335, 16575, 16863, 17010, 17325, 17577, 17885, 18423, 18767, 19467, 21483, 22995, 23715, 24583, 24941, 25039
Offset: 1

Views

Author

Antti Karttunen, May 09 2019

Keywords

Examples

			135 has eight divisors: 1, 3, 5, 9, 15, 27, 45, 135. Of these only two, d = 1 and d = 9 are such that A048720(A065621(d),135/d) = 135, thus A325565(135) = 2. On the other hand, when iterating A325567 starting from 135 we get: A325567(135) = 9, A325567(9) = 3 and A325567(3) = 1, so A325568(135) = 3 > A325565(135), thus 135 is included in this sequence.
		

Crossrefs

Programs

Showing 1-10 of 13 results. Next