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

A338516 Starts of runs of 4 consecutive numbers that are divisible by the total binary weight of their divisors (A093653).

Original entry on oeis.org

1377595575, 4275143301, 13616091683, 13640596128, 15016388244, 15176619135, 21361749754, 23605084359, 24794290167, 28025464183, 29639590888, 30739547718, 33924433023, 35259630279, 38008366692, 38670247670, 38681191672, 40210059079, 40507412213, 49759198333, 52555068607
Offset: 1

Views

Author

Amiram Eldar, Oct 31 2020

Keywords

Comments

Can 5 consecutive numbers be divisible by the total binary weight of their divisors? If they exist, then they are larger than 10^11.

Examples

			1377595575 is a term since the 4 consecutive numbers from 1377595575 to 1377595578 are all terms of A093705.
		

Crossrefs

Subsequence of A338514 and A338515.
Similar sequences: A141769, A330933, A334372, A338454.

Programs

  • Mathematica
    divQ[n_] := Divisible[n, DivisorSum[n, DigitCount[#, 2, 1] &]]; div = divQ /@ Range[4]; Reap[Do[If[And @@ div, Sow[k - 4]]; div = Join[Rest[div], {divQ[k]}], {k, 5, 5*10^9}]][[2, 1]]
    SequencePosition[Table[If[Mod[n,Total[Flatten[IntegerDigits[#,2]&/@Divisors[n]]]]==0,1,0],{n,526*10^8}],{1,1,1,1}][[;;,1]] (* The program will take a long time to run. *) (* Harvey P. Dale, May 28 2023 *)

A034690 Sum of digits of all the divisors of n.

Original entry on oeis.org

1, 3, 4, 7, 6, 12, 8, 15, 13, 9, 3, 19, 5, 15, 15, 22, 9, 30, 11, 15, 14, 9, 6, 33, 13, 15, 22, 29, 12, 27, 5, 27, 12, 18, 21, 46, 11, 24, 20, 27, 6, 33, 8, 21, 33, 18, 12, 52, 21, 21, 18, 26, 9, 48, 18, 48, 26, 27, 15, 42, 8, 15, 32, 37, 21, 36, 14, 36, 24, 36, 9, 69, 11, 24, 34
Offset: 1

Views

Author

Keywords

Comments

For first occurrence of k, or 0 if k never appears, see A191000.
The only fixed points are 1 and 15. These are also the only loops of iterations of A034690: see the SeqFan thread "List the divisors...". - M. F. Hasler, Nov 08 2015
The following sequence is composed of numbers n such that the sum of digits of all divisors of n equals 15: 8, 14, 15, 20, 26, 59, 62, ... It actually depicts the positions of number 15 in this sequence: see the SeqFan thread "List the divisors...". - V.J. Pohjola, Nov 09 2015

Examples

			a(15) = 1 + 3 + 5 + (1+5) = 15. - _M. F. Hasler_, Nov 08 2015
		

Crossrefs

Cf. A093653 (binary equivalent)

Programs

  • Haskell
    a034690 = sum . map a007953 . a027750_row
    -- Reinhard Zumkeller, Jan 20 2014
    
  • Maple
    with(numtheory); read transforms; f:=proc(n) local t1, t2, i; t1:=divisors(n); t2:=0; for i from 1 to nops(t1) do t2:=t2+digsum(t1[i]); od: t2; end;
    # Alternative:
    sd:= proc(n) option remember; local k; k:= n mod 10; k + procname((n-k)/10) end proc:
    for n from 0 to 9 do sd(n):= n od:
    a:= n -> add(sd(d), d=numtheory:-divisors(n)):
    map(a, [$1..100]); # Robert Israel, Nov 17 2015
  • Mathematica
    Table[Plus @@ Flatten@ IntegerDigits@ Divisors@n, {n, 75}] (* Robert G. Wilson v, Sep 30 2006 *)
  • PARI
    vector(100, n, sumdiv(n, d, sumdigits(d))) \\ Michel Marcus, Jun 28 2015
    
  • PARI
    A034690(n)=sumdiv(n,d,sumdigits(d)) \\ For use in other sequences. - M. F. Hasler, Nov 08 2015
    
  • Python
    from sympy import divisors
    def sd(n): return sum(map(int, str(n)))
    def a(n): return sum(sd(d) for d in divisors(n))
    print([a(n) for n in range(1, 76)]) # Michael S. Branicky, Oct 06 2021

A192895 A000120-deficiency of n.

Original entry on oeis.org

-1, 0, -1, 1, -1, 2, -2, 2, 1, 2, -2, 5, -2, 2, 1, 3, -1, 6, -2, 5, 3, 2, -3, 8, 0, 2, 1, 6, -3, 10, -4, 4, 4, 2, 3, 11, -2, 2, 2, 8, -2, 12, -3, 6, 7, 2, -4, 11, 1, 6, 1, 6, -3, 10, 1, 10, 2, 2, -4, 19, -4, 2, 5, 5, 4, 12, -2, 5, 4, 12, -3, 16, -2, 2, 8, 6
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 12 2011

Keywords

Crossrefs

Cf. A257691 (positions where a(n) <= 0), A294905 (and its char.fun).

Programs

  • Haskell
    a192895 n =
       sum (map a000120 $ filter ((== 0) . (mod n)) [1..n-1]) - a000120 n
    a192895_list = map a192895 [1..]
    
  • Mathematica
    a[n_] := DivisorSum[n, Total[IntegerDigits[#, 2]]*(-1)^Boole[# == n]&]; Array[a, 80] (* Jean-François Alcover, Dec 05 2015, adapted from PARI *)
  • PARI
    a(n)=sumdiv(n,d,hammingweight(d)*(-1)^(d==n)) \\ Charles R Greathouse IV, Feb 07 2013
    
  • Python
    from sympy import divisors
    def A192895(n): return sum((d.bit_count() if dChai Wah Wu, Jul 25 2023

Formula

a(n) = Sum(A000120(d): 1 <= d < n and n mod d = 0) - A000120(n); see A175522 for motivation and more information;
a(A175524(n)) < 0; a(A175522(n)) = 0; a(A175526(n)) > 0.
a(n) = A292257(n) - A000120(n). - Antti Karttunen, Nov 10 2017

A292257 a(n) is the total number of 1's in binary expansion of all proper divisors of n.

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 1, 3, 3, 4, 1, 7, 1, 5, 5, 4, 1, 8, 1, 7, 6, 5, 1, 10, 3, 5, 5, 9, 1, 14, 1, 5, 6, 4, 6, 13, 1, 5, 6, 10, 1, 15, 1, 9, 11, 6, 1, 13, 4, 9, 5, 9, 1, 14, 6, 13, 6, 6, 1, 23, 1, 7, 11, 6, 6, 14, 1, 7, 7, 15, 1, 18, 1, 5, 12, 9, 7, 16, 1, 13, 9, 5, 1, 24, 5, 6, 7, 13, 1, 26, 7, 11, 8, 7, 6, 16, 1, 11, 10, 15, 1, 14, 1, 13, 18
Offset: 1

Views

Author

Antti Karttunen, Oct 04 2017

Keywords

Comments

If a(n) == A000120(n), then n is in A175522, if a(n) < A000120(n), then n is in A175524, and if a(n) > A000120(n), then n is in A175526.

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, DigitCount[#, 2, 1] &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 20 2023 *)
    Table[Total[Flatten[IntegerDigits[#,2]&/@Most[Divisors[n]]]],{n,120}] (* Harvey P. Dale, Oct 11 2024 *)
  • PARI
    A292257(n) = sumdiv(n,d,(d
    				

Formula

a(n) = Sum_{d|n, dA000120(d).
a(n) = A093653(n) - A000120(n).
a(n) = A192895(n) + A000120(n).
a(n) = A001222(A293214(n)).
A000035(a(n)) = A000035(A290090(n)). [Parity-wise equivalent with A290090.]

A300837 a(n) is the total number of terms (1-digits) in Zeckendorf representation of all divisors of n.

Original entry on oeis.org

1, 2, 2, 4, 2, 5, 3, 5, 4, 5, 3, 10, 2, 6, 5, 7, 4, 9, 4, 10, 5, 6, 3, 13, 5, 5, 7, 11, 3, 13, 4, 10, 8, 6, 6, 16, 3, 8, 5, 14, 4, 12, 4, 11, 10, 8, 3, 18, 6, 11, 9, 10, 5, 16, 5, 14, 7, 6, 4, 23, 4, 8, 9, 13, 6, 16, 5, 10, 7, 14, 4, 23, 4, 8, 12, 12, 8, 13, 4, 20, 10, 9, 5, 23, 9, 9, 8, 17, 2, 22, 6, 12, 8, 6, 8, 24, 3, 12, 13, 19, 5, 15, 4, 14, 13
Offset: 1

Views

Author

Antti Karttunen, Mar 18 2018

Keywords

Examples

			For n=12, its divisors are 1, 2, 3, 4, 6 and 12. Zeckendorf-representations (A014417) of these numbers are 1, 10, 100, 101, 1001 and 10101. Total number of 1's present is 10 (ten), thus a(12) = 10.
		

Crossrefs

Programs

  • PARI
    A072649(n) = { my(m); if(n<1, 0, m=0; until(fibonacci(m)>n, m++); m-2); }; \\ From A072649
    A007895(n) = { my(s=0); while(n>0, s++; n -= fibonacci(1+A072649(n))); (s); };
    A300837(n) = sumdiv(n,d,A007895(d));

Formula

a(n) = Sum_{d|n} A007895(d).
a(n) = A300836(n) + A007895(n).
For all n >=1, a(n) >= A005086(n).

A093705 Numbers that are divisible by the total number of 1's in the binary expansions of all their divisors.

Original entry on oeis.org

1, 2, 3, 6, 8, 24, 27, 45, 49, 54, 55, 77, 90, 98, 108, 110, 128, 154, 180, 189, 209, 216, 299, 324, 360, 378, 384, 392, 418, 425, 440, 448, 598, 616, 689, 765, 783, 850, 855, 864, 880, 891, 896, 931, 972, 1023, 1040, 1056, 1160, 1188, 1200, 1209, 1215, 1378
Offset: 1

Views

Author

Jason Earls, May 17 2004

Keywords

Comments

Numbers of the form 2^(2^k-1) (A058891) are terms of this sequence since A093653(2^(2^k-1)) = 2^k. - Amiram Eldar, Oct 31 2020

Examples

			a(5) = 8 because the divisors of 8 in binary are: 1, 10, 100, 1000, with four 1's and 8/4 = 2.
		

Crossrefs

Cf. A093653.
A058891 is a subsequence.

Programs

  • Magma
    f:=func< n|&+[&+Intseq(d,2):d in Divisors(n)]>; [k:k in [1..1500]| k mod f(k) eq 0]; // Marius A. Burtea, Dec 16 2019
  • Mathematica
    Select[Range[1500], Divisible[#, Plus @@ DigitCount[Divisors[#], 2, 1]] &] (* Amiram Eldar, Dec 16 2019 *)

A305795 Restricted growth sequence transform of A305794, a filter sequence constructed from the binary expansions of the divisors of n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 11, 13, 14, 15, 5, 16, 11, 17, 18, 19, 20, 21, 22, 19, 23, 24, 20, 25, 26, 27, 28, 10, 29, 30, 31, 19, 32, 33, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 23, 36, 35, 43, 44, 45, 32, 38, 46, 47, 39, 48, 49, 50, 51, 52, 11, 17, 53, 54, 20, 55, 31, 56, 57, 36, 58, 59, 39, 60, 61, 56, 35, 62, 63, 64, 65, 66, 35, 67
Offset: 1

Views

Author

Antti Karttunen, Jun 11 2018

Keywords

Crossrefs

Programs

  • PARI
    \\ Needs also code from A286622:
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A305794(n) = { my(m=1); fordiv(n, d, if(d>1, m *= prime(A286622(d)-1))); (m); };
    v305795 = rgs_transform(vector(up_to, n, A305794(n)));
    A305795(n) = v305795[n];

Formula

For all i, j:
a(i) = a(j) => A000005(i) = A000005(j).
a(i) = a(j) => A007814(i) = A007814(j).
a(i) = a(j) => A093653(i) = A093653(j).
a(i) = a(j) => A154402(i) = A154402(j).
a(i) = a(j) => A305436(i) = A305436(j).

A093687 Numbers k such that the total number of 1's in the binary expansion of all the divisors of k sets a new record.

Original entry on oeis.org

1, 2, 3, 6, 12, 18, 24, 30, 60, 90, 120, 180, 252, 360, 420, 504, 540, 630, 756, 840, 1080, 1260, 1980, 2520, 3780, 5040, 6300, 7560, 12600, 13860, 15120, 21420, 25200, 27720, 32760, 41580, 42840, 49140, 55440, 65520, 81900, 83160, 98280, 128520, 138600
Offset: 1

Views

Author

Jason Earls, May 16 2004

Keywords

Crossrefs

Cf. A093653.

Programs

  • Mathematica
    a[n_] := Plus @@ DigitCount[Divisors[n], 2, 1]; am = -1; c = 0; seq={}; Do[a1 = a[n]; If[a1 > am, am = a1; c++; AppendTo[seq, n]], {n, 1, 10^4}]; seq (* Amiram Eldar, Dec 17 2019 *)
  • Python
    # uses imports and definitions in A093653
    from itertools import count, islice
    def f(n): return A093653(n)
    def agen(r=0): yield from ((m, r:=fm)[0] for m in count(1) if (fm:=f(m))>r)
    print(list(islice(agen(), 45))) # Michael S. Branicky, Feb 15 2023

A182627 Total number of digits in binary expansion of all divisors of n.

Original entry on oeis.org

1, 3, 3, 6, 4, 8, 4, 10, 7, 10, 5, 15, 5, 10, 10, 15, 6, 17, 6, 18, 11, 12, 6, 24, 9, 12, 12, 18, 6, 24, 6, 21, 13, 14, 13, 30, 7, 14, 13, 28, 7, 26, 7, 21, 20, 14, 7, 35, 10, 21, 14, 21, 7, 28, 14, 28, 14, 14, 7, 42, 7, 14, 21, 28, 15, 30, 8, 24, 15, 30, 8
Offset: 1

Views

Author

Omar E. Pol, Nov 23 2010

Keywords

Comments

Also, total number of digits in row n of triangle A182620.
Also, number of digits of A182621(n).
Rows sums of triangle A182628.
From Davide Rotondo, Apr 20 2022: (Start)
Can be constructed by writing the sequence of natural numbers with 1 one, 2 twos, 4 threes, 8 fours, ..., where 1,2,4,8,... are consecutive powers of 2; then the same sequence spaced by a zero, then the same sequence spaced by two zeros, and so on. Finally add the values of the columns.
1 2 2 3 3 3 3 4 4 4 4 4 4 4 4 5 ...
0 1 0 2 0 2 0 3 0 3 0 3 0 3 0 4 ...
0 0 1 0 0 2 0 0 2 0 0 3 0 0 3 0 ...
0 0 0 1 0 0 0 2 0 0 0 2 0 0 0 3 ...
0 0 0 0 1 0 0 0 0 2 0 0 0 0 2 0 ...
0 0 0 0 0 1 0 0 0 0 0 2 0 0 0 0 ...
0 0 0 0 0 0 1 0 0 0 0 0 0 2 0 0 ...
0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 2 ...
0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ...
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 ...
...
----------------------------------------------
Tot. 1 3 3 6 4 8 4 10 7 10 5 15 5 10 10 15 ... (End)

Examples

			The divisors of 12 are 1, 2, 3, 4, 6, 12. These divisors written in base 2 are 1, 10, 11, 100, 110, 1100. Then a(12)=15 because 1+2+2+3+3+4 = 15.
		

Crossrefs

Cf. A093653 (number of 1's in binary expansion of all divisors of n).
Cf. A226590 (number of 0's in binary expansion of all divisors of n).

Programs

  • Mathematica
    Table[Total[IntegerLength[Divisors[n],2]],{n,60}] (* Harvey P. Dale, Jan 26 2012 *)
  • PARI
    a(n) = sumdiv(n, d, 1+logint(d, 2)); \\ Michel Marcus, Dec 11 2020
    
  • Python
    from sympy import divisors
    def a(n): return sum(d.bit_length() for d in divisors(n))
    print([a(n) for n in range(1, 72)]) # Michael S. Branicky, Apr 21 2022

Formula

a(n) = A093653(n) + A226590(n). - Jaroslav Krizek, Sep 01 2013
a(n) = tau(n) + Sum_{d|n} floor(log_2(d)). - Ridouane Oudra, Dec 11 2020
a(n) = Sum_{i=0..floor(log_2(n))} A135539(n,2^i). - Ridouane Oudra, Sep 19 2022

A339549 a(n) is the product of the binary weights (A000120) of the divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 3, 1, 4, 4, 3, 8, 3, 9, 16, 1, 2, 16, 3, 8, 18, 9, 4, 16, 6, 9, 16, 27, 4, 256, 5, 1, 12, 4, 18, 64, 3, 9, 24, 16, 3, 324, 4, 27, 128, 16, 5, 32, 9, 36, 16, 27, 4, 256, 30, 81, 24, 16, 5, 4096, 5, 25, 216, 1, 12, 144, 3, 8, 24, 324, 4, 256, 3
Offset: 1

Views

Author

Amiram Eldar, Dec 08 2020

Keywords

Comments

Analogous to A093653 with product instead of sum.

Examples

			a(6) = 4 since the divisors of 6 are {1, 2, 3, 6}, and in binary representation {1, 10, 11, 110}. The number of 1's are {1, 1, 2, 2} and their product is 1*1*2*2 = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ (DigitCount[#, 2, 1] & /@ Divisors[n]); Array[a, 100]
  • PARI
    a(n) = vecprod(apply(hammingweight, divisors(n))); \\ Michel Marcus, Dec 08 2020

Formula

a(n) = Product_{d|n} A000120(d).
a(n) = 1 if and only if n is a power of 2 (A000079).
Previous Showing 11-20 of 34 results. Next