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 41-50 of 73 results. Next

A331819 Positive numbers k such that -k is a negative negabinary-Niven number, i.e., divisible by the sum of digits of its negabinary representation (A027615).

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 28, 30, 32, 33, 34, 36, 39, 40, 42, 44, 48, 54, 55, 56, 60, 63, 64, 66, 68, 70, 72, 77, 78, 80, 84, 90, 92, 96, 100, 102, 104, 108, 111, 112, 114, 115, 116, 120, 123, 124, 126, 128, 129, 130, 132, 135, 136, 138, 140
Offset: 1

Views

Author

Amiram Eldar, Jan 27 2020

Keywords

Examples

			6 is a term since A039724(-6) = 1110 and 1 + 1 + 1 + 0 = 3 is a divisor of 6.
		

Crossrefs

Programs

  • Mathematica
    negaBinWt[n_] := negaBinWt[n] = If[n==0, 0, negaBinWt[Quotient[n-1, -2]] + Mod[n, 2]]; negaBinNivenQ[n_] := Divisible[n, negaBinWt[-n]]; Select[Range[100], negaBinNivenQ]

A381581 Numbers divisible by the sum of the digits in their Chung-Graham representation (A381579).

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 20, 21, 22, 24, 27, 28, 30, 40, 42, 44, 45, 48, 55, 56, 57, 58, 60, 66, 70, 72, 75, 76, 80, 84, 90, 92, 95, 96, 100, 102, 110, 111, 112, 115, 116, 120, 132, 135, 138, 140, 144, 150, 152, 153, 156, 168, 170, 175, 176, 180, 186, 190, 195, 198
Offset: 1

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

Numbers k such that A291711(k) divides k.
Analogous to Niven numbers (A005349) with the Chung-Graham representation (A381579) instead of the decimal representation.
A001906(k) = Fibonacci(2*k) is a term for all k >= 1.
If k is not divisible by 3 (A001651), then Fibonacci(2*k) + 1 is a term.

Examples

			4 is a term since A291711(4) = 1 divides 4.
6 is a term since A291711(6) = 2 divides 6.
		

Crossrefs

Subsequences: A381582, A381583, A381584, A381585.
Similar sequences: A005349, A049445, A064150, A328208, A328212.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; q[n_] := Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2; m -= 2*f[k], s++; m -= f[k]]]; Divisible[n, s]]; Select[Range[200], q]
  • PARI
    mx = 20; fvec = vector(mx, i, fibonacci(2*i)); f(n) = if(n <= mx, fvec[n], fibonacci(2*n));
    isok(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2; m -= 2*f(k), s++; m -= f(k))); !(n % s);}

A235602 a(n) = n/wt(n) if wt(n) divides n, otherwise a(n) = n, where wt(n) is the binary weight of n (A000120).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 18 2014

Keywords

Crossrefs

Programs

  • Mathematica
    bw[n_]:=Module[{w=DigitCount[n,2,1]},If[Divisible[n,w],n/w,n]]; Array[ bw,90] (* Harvey P. Dale, Nov 06 2016 *)
  • PARI
    a(n) = my(s=hammingweight(n)); if (n % s, n, n/s); \\ Michel Marcus, Jul 15 2021

Formula

From Amiram Eldar, Aug 04 2025: (Start)
a(n) = n if and only if n is in A065878 or A000079.
a(n) < n if and only if n is in A049445 but not in A000079. (End)

A364006 Wythoff-Niven numbers: numbers that are divisible by the number of 1's in their Wythoff representation.

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 10, 12, 15, 18, 20, 21, 24, 26, 28, 32, 35, 39, 40, 42, 45, 47, 51, 52, 54, 55, 56, 60, 68, 72, 76, 80, 84, 86, 88, 90, 91, 98, 100, 102, 105, 117, 120, 123, 125, 135, 136, 138, 141, 143, 144, 156, 164, 168, 172, 174, 176, 178, 180, 188, 192
Offset: 1

Views

Author

Amiram Eldar, Jul 01 2023

Keywords

Comments

Numbers k such that A135818(k) | k.
Includes all the positive even-indexed Fibonacci numbers (A001906), since the Wythoff representation of Fibonacci(2*n), for n >= 1, is 1 followed by n-1 0's.

Crossrefs

Programs

  • Mathematica
    wnQ[n_] := (s = Total[w[n]]) > 0 && Divisible[n, s] (* using the function w[n] from A364005 *)

A364123 Stolarsky-Niven numbers: numbers that are divisible by the number of 1's in their Stolarsky representation (A364121).

Original entry on oeis.org

2, 4, 6, 8, 9, 12, 14, 16, 20, 22, 24, 27, 30, 36, 38, 40, 42, 44, 48, 54, 56, 57, 60, 65, 69, 72, 75, 80, 84, 85, 90, 92, 96, 98, 100, 102, 104, 108, 112, 116, 120, 124, 126, 132, 136, 138, 145, 147, 150, 153, 155, 159, 160, 175, 180, 185, 190, 195, 196, 205
Offset: 1

Views

Author

Amiram Eldar, Jul 07 2023

Keywords

Comments

Numbers k such that A200649(k) | k.
Fibonacci(k) + 1 is a term if k !== 3 (mod 6) (i.e., k is in A047263).

Examples

			4 is a term since its Stolarsky representation, A364121(4) = 10, has one 1 and 4 is divisible by 1.
6 is a term since its Stolarsky representation, A364121(6) = 101, has 2 1's and 6 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    stol[n_] := stol[n] = If[n == 1, {}, If[n != Round[Round[n/GoldenRatio]*GoldenRatio], Join[stol[Floor[n/GoldenRatio^2] + 1], {0}], Join[stol[Round[n/GoldenRatio]], {1}]]];
    stolNivQ[n_] := n > 1 && Divisible[n, Total[stol[n]]];
    Select[Range[200], stolNivQ]
  • PARI
    stol(n) = {my(phi=quadgen(5)); if(n==1, [], if(n != round(round(n/phi)*phi), concat(stol(floor(n/phi^2) + 1), [0]), concat(stol(round(n/phi)), [1])));}
    isA364123(n) = n > 1 && !(n % vecsum(stol(n)));

A385483 Where records occur in A385482.

Original entry on oeis.org

1, 3, 7, 11, 13, 19, 103, 391, 1811, 3589, 5147, 6683, 21883, 46159, 64133, 149839, 151013, 318377, 650543, 1279211, 42559939, 43120271, 55201423, 198069181, 265237811, 929670011, 930260173, 1879562281, 3320654641, 5390681357, 52883996713, 78842843063, 250434427519
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Crossrefs

Cf. A049445, A144364 (decimal analog), A385482, A385484 (record values), A385486.

Programs

  • Mathematica
    f[n_] := Module[{m = n, k = 1}, While[!Divisible[m, DigitSum[m, 2]], m += n; k++]; k];
    seq[lim_] := Module[{s = {}, fm = -1, fi}, Do[fi = f[i]; If[fi > fm, fm = fi; AppendTo[s, i]], {i, 1, lim}]; s]; seq[10^4]
  • PARI
    f(n) = {my(m = n, k = 1); while(m % hammingweight(m), m += n; k++); k;}
    list(lim) = my(fm = -1, fi); for(i = 1, lim, fi = f(i); if(fi > fm, fm = fi; print1(i, ", ")));

Formula

A385482(a(n)) = A385484(n).

A385486 Where records occur in A385485.

Original entry on oeis.org

1, 2, 12, 126, 252, 504, 2040, 4080, 16380, 32760, 65520, 524286, 1048572, 4194300, 8388600, 134217720, 268435440, 7516192740, 10737418230, 21474836460, 137438953440, 274877906880, 274877906940, 549755813880, 8796093022200, 8796093022206, 17592186044412
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Crossrefs

Cf. A049445, A144376 (decimal analog), A385483, A385485, A385487 (record values).

Programs

  • Mathematica
    f[n_] := Module[{m = n, k = 1}, While[Divisible[m, DigitSum[m, 2]], m += 2*n; k += 2]; k];
    seq[lim_] := Module[{s = {}, fm = -1, fi}, Do[fi = f[i]; If[fi > fm, fm = fi; AppendTo[s, i]], {i, 1, lim}]; s]; seq[10^4]
  • PARI
    f(n) = {my(m = n, k = 1); while(!(m % hammingweight(m)), m += 2*n; k += 2); k;}
    list(lim) = my(fm = -1, fi); for(i = 1, lim, fi = f(i); if(fi > fm, fm = fi; print1(i, ", ")));

Formula

A385485(a(n)) = A385487(n).

Extensions

a(21)-a(27) from Chai Wah Wu, Jul 02 2025

A385487 Records in A385485.

Original entry on oeis.org

3, 7, 29, 65, 69, 81, 257, 259, 4097, 4113, 4129, 262145, 262149, 1048577, 1048583, 16777217, 16777219, 38347927, 214748365, 214748369, 4294967297, 4294967299, 68719476737, 68719476769, 1099511627777, 4398046511105, 4398046511109
Offset: 1

Views

Author

Amiram Eldar, Jun 30 2025

Keywords

Crossrefs

Cf. A049445, A144375 (decimal analog), A385484, A385485, A385486 (indices of records).

Programs

  • Mathematica
    f[n_] := Module[{m = n, k = 1}, While[Divisible[m, DigitSum[m, 2]], m += 2*n; k += 2]; k];
    seq[lim_] := Module[{s = {}, fm = -1, fi}, Do[fi = f[i]; If[fi > fm, fm = fi; AppendTo[s, fi]], {i, 1, lim}]; s]; seq[10^4]
  • PARI
    f(n) = {my(m = n, k = 1); while(!(m % hammingweight(m)), m += 2*n; k += 2); k;}
    list(lim) = my(fm = -1, fi); for(i = 1, lim, fi = f(i); if(fi > fm, fm = fi; print1(fi, ", ")));

Formula

a(n) = A385485(A385486(n)).

Extensions

a(21)-a(27) from Chai Wah Wu, Jul 02 2025

A180490 Numbers k such that (A000120(k))^2 divides k.

Original entry on oeis.org

1, 2, 4, 8, 12, 16, 20, 24, 32, 36, 40, 48, 64, 68, 72, 80, 81, 96, 128, 132, 136, 144, 160, 162, 192, 240, 252, 256, 260, 261, 264, 272, 288, 320, 324, 368, 384, 425, 432, 464, 480, 504, 512, 516, 520, 522, 528, 544, 576, 624, 625, 637, 640, 648, 675, 688, 720
Offset: 1

Views

Author

Ctibor O. Zizka, Sep 08 2010

Keywords

Comments

This is a subsequence of A049445.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Divisible[ n, DigitCount[n, 2, 1]^2]; Select[ Range@ 735, fQ] (* Robert G. Wilson v, Sep 10 2010 *)
  • PARI
    isok(k) = !(k % hammingweight(k)^2); \\ Amiram Eldar, Jan 10 2025
    
  • Python
    def ok(n): return n and n%n.bit_count()**2 == 0
    print([k for k in range(721) if ok(k)]) # Michael S. Branicky, Jan 10 2025

Formula

{k: (A000120(k))^2 | k}.

Extensions

a(43) onwards from Robert G. Wilson v, Sep 10 2010

A306263 Numbers k such that, for any divisor d of k, the Hamming weight of d divides k.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 24, 32, 34, 36, 40, 42, 48, 60, 64, 66, 68, 72, 80, 84, 92, 96, 108, 116, 120, 126, 128, 132, 136, 144, 156, 160, 168, 172, 180, 184, 192, 204, 212, 216, 222, 228, 232, 240, 246, 252, 256, 264, 272, 276, 284, 288, 300, 310
Offset: 1

Views

Author

Rémy Sigrist, Mar 02 2019

Keywords

Comments

The Hamming weight of a number is given by A000120.
This sequence is a binary variant of A285815.
This sequence is infinite as it contains all powers of 2 (A000079).
All terms belong to A049445.
If k belongs to the sequence, then 2*k belongs to the sequence.
All terms except 1 are even. - Robert Israel, Mar 05 2019

Examples

			For n = 108:
- the divisors of 108 are 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54, 108,
- the corresponding Hamming weights are 1, 1, 2, 1, 2, 2, 2, 2, 4, 2, 4, 4,
- they all divide 108,
- hence 108 belongs to the sequence.
For n = 98:
- the divisors of 98 are 1, 2, 7, 14, 49, 98,
- the correspond Hamming weights are 1, 1, 3, 3, 3, 3,
- 3 does not divide 98,
- hence 98 does not belong to the sequence.
		

Crossrefs

Positions of zeros in A324393.

Programs

  • Magma
    [k:k in [1..310]| forall{d:d in Divisors(k)| k mod &+Intseq(d,2) eq 0}]; // Marius A. Burtea, Dec 30 2019
  • Maple
    filter:= proc(n) local F;
      F:= map(convert,map(convert,numtheory:-divisors(n),base,2),`+`);
      andmap(t -> n mod t = 0, F)
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Mar 05 2019
  • Mathematica
    Select[Range@ 310, With[{k = #}, AllTrue[Divisors@ k, Mod[k, DigitCount[#, 2, 1]] == 0 &]] &] (* Michael De Vlieger, Mar 05 2019 *)
  • PARI
    is(n) = fordiv(n,d,if (n%hammingweight(d), return (0))); return ( )
    
Previous Showing 41-50 of 73 results. Next