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

A358033 a(1) = 2; a(n) - a(n-1) = A093803(a(n-1)), the largest odd proper divisor of a(n-1).

Original entry on oeis.org

2, 3, 4, 5, 6, 9, 12, 15, 20, 25, 30, 45, 60, 75, 100, 125, 150, 225, 300, 375, 500, 625, 750, 1125, 1500, 1875, 2500, 3125, 3750, 5625, 7500, 9375, 12500, 15625, 18750, 28125, 37500, 46875, 62500, 78125, 93750, 140625, 187500, 234375, 312500, 390625, 468750
Offset: 1

Views

Author

Eric Angelini and Gavin Lupo, Oct 25 2022

Keywords

Examples

			a(1) = 2.
a(2) = 3. The only proper divisor of 2 is 1; 2 + 1 = 3.
a(3) = 4. The only proper divisor of 3 is 1; 3 + 1 = 4.
...
a(8) = 15.
a(9) = 20. Proper divisors of 15 are 1, 3, 5; largest odd proper divisor = 5; 15 + 5 = 20.
		

Crossrefs

Cf. A093803, A000792 (with largest proper divisor instead).

Programs

  • PARI
    f(n) = my(x=if(n==1, 1, n/factor(n)[1, 1])); x >> valuation(x, 2); \\ Michel Marcus, Oct 26 2022
    lista(nn) = my(va = vector(nn)); va[1] = 2; for (n=2, nn, va[n] = va[n-1] + f(va[n-1]);); va; \\ Michel Marcus, Oct 26 2022
  • Python
    a_n = 2
    result = [2]
    for n in range(30):
        temp = []
        for i in range(1, a_n):
            if a_n % i == 0:
                if (i % 2 != 0) and (i != a_n):
                    temp.append(i)
        result.append(a_n + max(temp))
        a_n = a_n + max(temp)
    print(result)
    

Formula

a(n+1) - a(n) = A056487(floor((n-2)/3)), for n > 2. This works because A056487(n+3) = A056487(n+2)*A056487(n+1)/A056487(n). - Thomas Scheuerle, Oct 26 2022

A366519 Largest odd divisor of n which is <= sqrt(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 5, 1, 3, 1, 1, 5, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 5, 1, 1, 3, 7, 5, 3, 1, 1, 3, 5, 7, 3, 1, 1, 5, 1, 1, 7, 1, 5, 3, 1, 1, 3, 7, 1, 3, 1, 1, 5, 1, 7, 3, 1, 5, 9, 1, 1, 7, 5, 1, 3, 1, 1, 9, 7, 1, 3, 1, 5, 3, 1, 7, 9, 5
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 11 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Last[Select[Divisors[n], # <= Sqrt[n] && OddQ[#] &]], {n, 100}]
  • PARI
    a(n) = {my(m=1); fordiv(n/2^valuation(n,2), d, if(d^2 <= n, m=max(m,d))); m} \\ Andrew Howroyd, Oct 11 2023

A366520 Largest odd divisor of n which is < sqrt(n), for n >= 2; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 5, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 1, 3, 1, 1, 5, 1, 1, 3, 1, 5, 3, 1, 1, 3, 5, 7, 3, 1, 1, 5, 1, 1, 7, 1, 5, 3, 1, 1, 3, 7, 1, 3, 1, 1, 5, 1, 7, 3, 1, 5, 3, 1, 1, 7, 5, 1, 3, 1, 1, 9, 7, 1, 3, 1, 5, 3, 1, 7, 9, 5
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 11 2023

Keywords

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[Last[Select[Divisors[n], # < Sqrt[n] && OddQ[#] &]], {n, 2, 100}]]
  • PARI
    a(n) = {my(m=1); fordiv(n/2^valuation(n,2), d, if(d^2 < n, m=max(m,d))); m} \\ Andrew Howroyd, Oct 11 2023

A254522 Numerators of (2^n - 1 + (-1)^n)/(2*n), n > 0.

Original entry on oeis.org

0, 1, 1, 2, 3, 16, 9, 16, 85, 256, 93, 512, 315, 4096, 5461, 2048, 3855, 65536, 13797, 131072, 349525, 1048576, 182361, 1048576, 3355443, 16777216, 22369621, 33554432, 9256395, 268435456, 34636833, 67108864, 1431655765, 4294967296, 17179869183, 8589934592, 1857283155, 68719476736, 91625968981
Offset: 1

Views

Author

Paul Curtz, Jan 31 2015

Keywords

Comments

An autosequence of the first kind is a sequence which main diagonal is A000004.
Difference table of a(n)/A093803(n):
0, 1, 1, 2, 3, 16/3, ...
1, 0, 1, 1, 7/3, 11/3, ...
-1, 1, 0, 4/3, 4/3, 10/3, ...
2, -1, 4/3, 0, 2, 2, ...
-3, 7/3, -4/3, 2, 0, 16/5, ...
16/3, -11/3, 10/3, -2, 16/5, 0, ...
etc.
This is an autosequence of the first kind.
Its first (or second) upper diagonal is A075101(n)/(2*A000265(n)).
From Robert Israel, Apr 03 2017: (Start)
If p is a prime == 5 (mod 8), then a(5*p) = (2^(5*p-1)-1)/5 and a(5*p+3) = 2^(5*p) = 10*a(5*p)+2. This explains pairs such as
a(25) = 3355443
a(28) = 33554432
and
a(65) = 3689348814741910323
a(68) = 36893488147419103232. (End)

Crossrefs

Programs

  • Maple
    seq(numer((2^n-1+(-1)^n)/(2*n)), n=1..50); # Robert Israel, Feb 01 2015
  • Mathematica
    Table[Numerator[(2^n - 1 + (-1)^n)/(2*n)], {n, 39}] (* Michael De Vlieger, Feb 01 2015 *)

Extensions

a(25) corrected by Robert Israel, Apr 03 2017

A365837 Largest proper square divisor of n, for n >= 2; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 9, 1, 4, 1, 1, 1, 4, 1, 1, 9, 4, 1, 1, 1, 16, 1, 1, 1, 9, 1, 1, 1, 4, 1, 1, 1, 4, 9, 1, 1, 16, 1, 25, 1, 4, 1, 9, 1, 4, 1, 1, 1, 4, 1, 1, 9, 16, 1, 1, 1, 4, 1, 1, 1, 36, 1, 1, 25, 4, 1, 1, 1, 16, 9, 1, 1, 4, 1, 1, 1, 4, 1, 9, 1, 4, 1, 1, 1, 16, 1, 49, 9, 25
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 17 2023

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local F, t;
      if issqr(n) then
        n/min(numtheory:-factorset(n))^2
      else
        F:= ifactors(n)[2];
        mul(t[1]^(2*floor(t[2]/2)),t=F)
      fi
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Nov 20 2023
  • Mathematica
    Join[{1}, Table[Last[Select[Divisors[n], # < n && IntegerQ[Sqrt[#]]  &]], {n, 2, 100}]]
    f[p_, e_] := p^(2*Floor[e/2]); a[n_] := Module[{fct = FactorInteger[n]}, Times @@ f @@@ fct/If[AllTrue[fct[[;; , 2]], EvenQ], fct[[1, 1]]^2, 1]]; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
  • PARI
    a(n) = if (n==1, 1, my(d=divisors(n)); vecmax(select(issquare, Vec(d, #d-1)))); \\ Michel Marcus, Oct 17 2023
    
  • Python
    from math import prod
    from sympy import factorint
    def A365837(n):
        if n<=1: return 1
        f = factorint(n)
        return prod(p**(e&-2) for p, e in f.items())//(min(f)**2 if all(e&1^1 for e in f.values()) else 1) # Chai Wah Wu, Oct 20 2023

A366649 Largest prime power (including 1) proper divisor of n, for n >= 2; a(1) = 1.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 4, 1, 7, 5, 8, 1, 9, 1, 5, 7, 11, 1, 8, 5, 13, 9, 7, 1, 5, 1, 16, 11, 17, 7, 9, 1, 19, 13, 8, 1, 7, 1, 11, 9, 23, 1, 16, 7, 25, 17, 13, 1, 27, 11, 8, 19, 29, 1, 5, 1, 31, 9, 32, 13, 11, 1, 17, 23, 7, 1, 9, 1, 37, 25, 19, 11, 13, 1, 16, 27, 41, 1, 7, 17
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 17 2023

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(n) local F,t;
      F:= ifactors(n)[2];
      if nops(F) = 1 then n/F[1,1]
      else max(map(t -> t[1]^t[2], F))
      fi
    end proc:
    f(1):= 1:
    map(f, [$1..100]); # Robert Israel, Nov 19 2023
  • Mathematica
    Join[{1}, Table[Last[Select[Divisors[n], # < n && (# == 1 || PrimePowerQ[#]) &]], {n, 2, 85}]]
    a[n_] := Module[{f = FactorInteger[n]}, If[Length[f] == 1, f[[1, 1]]^(f[[1, 2]] - 1), Max[Power @@@ f]]]; Array[a, 100] (* Amiram Eldar, Oct 19 2023 *)
  • PARI
    a(n) = if (n==1, 1, my(d=divisors(n)); vecmax(select(x->(isprimepower(x) || (x==1)), Vec(d, #d-1)))); \\ Michel Marcus, Oct 17 2023
Showing 1-6 of 6 results.