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 31-40 of 240 results. Next

A289618 a(n) = A289617(n) - A046645(n) = A005187(A001222(n)) - A046645(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jul 08 2017

Keywords

Crossrefs

Cf. A268375 (positions of zeros), A289619 (of ones).

Programs

Formula

a(n) = A289617(n) - A046645(n) = A005187(A001222(n)) - A046645(n).

A324348 a(n) = A294898(A005940(1+n)), where A294898(k) = A005187(k) - A000203(k).

Original entry on oeis.org

0, 0, 0, 0, 2, -2, 3, 0, 3, 0, 2, -6, 16, -5, 10, 0, 7, 1, 7, -4, 19, -16, 8, -14, 38, 4, 22, -21, 88, -16, 38, 0, 9, 5, 16, -3, 33, -15, 16, -12, 54, -7, 14, -52, 96, -58, 26, -30, 104, 22, 62, -20, 142, -76, 43, -53, 280, 26, 119, -68, 464, -42, 116, 0, 14, 7, 18, 1, 44, -14, 38, -11, 65, -1, 38, -59, 174, -66, 52, -28, 113, 16, 72, -59, 191, -160, 0, -124
Offset: 0

Views

Author

Antti Karttunen, Feb 24 2019

Keywords

Comments

Positions of zeros is given by the sequence A156552(A295296(n)), n >= 1, sorted into ascending order: 0, 1, 2, 3, 7, 9, 15, 31, 63, 86, 127, 255, 511, 519, 1023, 2047, 4095, 8191, 16383, 32767, ...

Crossrefs

Programs

  • PARI
    A324348(n) = { my(m1=2, m2=1, p=2, mp=p*p); while(n, if(!(n%2), p=nextprime(1+p); mp = p*p, m1 *= p; if(3==(n%4), mp *= p, m2 *= (mp-1)/(p-1))); n>>=1); ((m1-m2)-hammingweight(m1)); };
    
  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    A294898(n) = (A005187(n) - sigma(n));
    A324348(n) = A294898(A005940(1+n));

Formula

a(n) = A294898(A005940(1+n)).
a(n) = A324055(n) - A000120(A005940(1+n)).

A326131 Positive numbers n for which A000120(n) = k*A294898(n), with k < 0; numbers for which A326130(n) = sigma(n) - A005187(n).

Original entry on oeis.org

6, 28, 110, 496, 884, 8128, 18632, 85936, 116624, 15370304, 33550336, 73995392, 815634435, 3915380170, 5556840416, 6800695312, 8589869056
Offset: 1

Views

Author

Antti Karttunen, Jun 09 2019

Keywords

Comments

No further terms below 2^31.
See also comments in A326133.
The quotients A000120(k)/(sigma(k)-A005187(k)) for these terms are: 1, 1, 5, 1, 3, 1, 5, 9, 2, 2, 1, 2, 2. Ones occur at the positions of perfect numbers.
a(18) > 10^11. - Amiram Eldar, Jan 03 2021

Examples

			110 is "1101110" in binary, thus A000120(110) = 5. Sigma(110) = 216, while A005187(110) = 215, thus as 5 = 5*(216-215), 110 is included in this sequence.
		

Crossrefs

Intersection of A326132 and A326133, also of A326132 and A326138.
Cf. also A325981, A326141.

Programs

  • Mathematica
    q[n_] := Module[{bw = DigitCount[n, 2, 1], ab = DivisorSigma[1, n] - 2*n, sum}, (sum = ab + bw) > 0 && Divisible[bw, sum]]; Select[Range[10^5], q] (* Amiram Eldar, Jan 03 2021 *)
  • PARI
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    isA326131(n) = { my(t=sigma(n)-A005187(n)); (gcd(hammingweight(n), t) == t); };

Extensions

a(14)-a(17) from Amiram Eldar, Jan 03 2021

A122247 Partial sums of A005187.

Original entry on oeis.org

0, 1, 4, 8, 15, 23, 33, 44, 59, 75, 93, 112, 134, 157, 182, 208, 239, 271, 305, 340, 378, 417, 458, 500, 546, 593, 642, 692, 745, 799, 855, 912, 975, 1039, 1105, 1172, 1242, 1313, 1386, 1460, 1538, 1617, 1698, 1780, 1865, 1951, 2039, 2128, 2222, 2317, 2414
Offset: 0

Views

Author

Paul Barry, Aug 27 2006

Keywords

Crossrefs

Cf. A005187 (first differences).

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 0, b(iquo(n, 2))+n) end:
    a:= proc(n) option remember; `if`(n=0, 0, b(n)+a(n-1)) end:
    seq(a(n), n=0..50);  # Alois P. Heinz, Jan 25 2022
  • Mathematica
    Accumulate[Table[2n-Count[IntegerDigits[2 n,2],1],{n,0,70}]] (* Harvey P. Dale, Oct 22 2011 *)

Formula

a(n) = Sum_{k=1..n} Sum_{j=0..n} floor(k/2^j).
G.f.: (1/(1-x))*Sum_{k>=0} x^(2^k)/((1-x)*(1-x^(2^k))).

A213715 a(n) = position of A179016(n) in A005187.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 15, 16, 17, 19, 21, 23, 24, 26, 28, 31, 32, 33, 35, 37, 39, 40, 42, 44, 47, 48, 50, 52, 54, 56, 58, 60, 63, 64, 65, 67, 69, 71, 72, 74, 76, 79, 80, 82, 84, 86, 88, 90, 92, 95, 96, 98, 100, 102, 104, 107, 110, 112, 115, 118, 120, 123, 127, 128, 129, 131, 133, 135, 136, 138, 140, 143, 144, 146, 148, 150, 152, 154, 156, 159, 160, 162, 164, 166, 168
Offset: 0

Views

Author

Antti Karttunen, Oct 26 2012

Keywords

Crossrefs

Programs

Formula

a(n) = A213714(A179016(n)).

Extensions

Offset changed from 1 to 0 by Antti Karttunen, Nov 05 2012

A256994 a(n) = n + 1 when n <= 3, otherwise a(n) = 2^(n-2) + 3; also iterates of A005187 starting from a(1) = 2.

Original entry on oeis.org

2, 3, 4, 7, 11, 19, 35, 67, 131, 259, 515, 1027, 2051, 4099, 8195, 16387, 32771, 65539, 131075, 262147, 524291, 1048579, 2097155, 4194307, 8388611, 16777219, 33554435, 67108867, 134217731, 268435459, 536870915, 1073741827, 2147483651, 4294967299, 8589934595, 17179869187, 34359738371, 68719476739, 137438953475, 274877906947
Offset: 1

Views

Author

Antti Karttunen, Apr 15 2015

Keywords

Comments

Note that if we instead iterated function b(n) = 1+A005187(n), from b(1) onward, we would get the powers of two, A000079.

Crossrefs

Topmost row of A256995, leftmost column of A256997.

Programs

  • Mathematica
    Table[If[n<4,n+1,2^(n-2)+3],{n,40}] (* Harvey P. Dale, May 14 2019 *)
  • PARI
    A256994(n) = if(n < 4, n+1, 2^(n-2) + 3);
    
  • PARI
    \\ By iterating A005187:
    A005187(n) = { my(s=n); while(n>>=1, s+=n); s; };
    i=1; k=2; print1(k); while(i <= 40, k = A005187(k); print1(", ", k); i++);
    
  • Scheme
    (define (A256994 n) (if (< n 4) (+ n 1) (+ (A000079 (- n 2)) 3)))
    
  • Scheme
    ;; The following uses memoization-macro definec:
    (definec (A256994 n) (if (= 1 n) 2 (A005187 (A256994 (- n 1)))))

Formula

If n < 4, a(n) = n + 1, otherwise a(n) = 2^(n-2) + 3 = A062709(n-2).
a(1) = 2; for n > 1, a(n) = A005187(a(n-1)).

A276343 Permutation of natural numbers: a(1) = 1, a(A087686(1+n)) = A005187(1+a(n)), a(A088359(n)) = A055938(a(n)), where A088359 & A087686 = numbers that occur only once & more than once in A004001.

Original entry on oeis.org

1, 3, 2, 7, 6, 5, 4, 15, 14, 13, 12, 11, 9, 10, 8, 31, 30, 29, 28, 27, 26, 24, 20, 25, 21, 23, 22, 17, 18, 19, 16, 63, 62, 61, 60, 59, 58, 57, 55, 51, 43, 56, 52, 44, 54, 48, 53, 50, 45, 36, 47, 37, 39, 49, 40, 41, 46, 42, 33, 34, 35, 38, 32, 127, 126, 125, 124, 123, 122, 121, 120, 118, 114, 106, 90, 119, 115, 107, 91, 117, 111, 99
Offset: 1

Views

Author

Antti Karttunen, Sep 03 2016

Keywords

Crossrefs

Inverse: A276344.
Similar or related permutations: A233276, A233278, A267111, A276345, A276441.
Compare also to the scatter-plots of A276443 and A276445.

Programs

Formula

a(1) = 1; for n > 1, if A093879(n-1) = 0 [when n is in A087686], a(n) = A005187(1+a(A080677(n)-1)), otherwise [when n is in A088359], a(n) = A055938(a(A004001(n)-1)).
As a composition of other permutations:
a(n) = A233276(A267111(n)).
a(n) = A233278(A276441(n)).

A276344 Permutation of natural numbers: a(1) = 1; a(A005187(1+n)) = A087686(1+a(n)), a(A055938(n)) = A088359(a(n)), where A088359 & A087686 = numbers that occur only once & more than once in A004001.

Original entry on oeis.org

1, 3, 2, 7, 6, 5, 4, 15, 13, 14, 12, 11, 10, 9, 8, 31, 28, 29, 30, 23, 25, 27, 26, 22, 24, 21, 20, 19, 18, 17, 16, 63, 59, 60, 61, 50, 52, 62, 53, 55, 56, 58, 41, 44, 49, 57, 51, 46, 54, 48, 40, 43, 47, 45, 39, 42, 38, 37, 36, 35, 34, 33, 32, 127, 122, 123, 124, 108, 110, 125, 111, 113, 114, 126, 89, 92, 117, 115, 118, 94, 119, 121
Offset: 1

Views

Author

Antti Karttunen, Sep 03 2016

Keywords

Crossrefs

Inverse: A276343.
Similar or related permutations: A233275, A233277, A267112, A276346, A276442.

Programs

Formula

a(1)=1; for n > 1, if A079559(n)=1 [when n is in A005187], a(n) = A087686(1+a(A213714(n)-1)), otherwise a(n) = A088359(a(A234017(n))).
As a composition of other permutations:
a(n) = A267112(A233275(n)).
a(n) = A276442(A233277(n)).

A276345 Permutation of natural numbers: a(1) = 1, a(A087686(1+n)) = A055938(a(n)), a(A088359(n)) = A005187(1+a(n)), where A088359 & A087686 = numbers that occur only once & more than once in A004001.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 03 2016

Keywords

Crossrefs

Inverse: A276346.
Similar or related permutations: A233276, A233278, A267111, A276343, A276441.

Programs

Formula

a(1) = 1; for n > 1, if A093879(n-1) = 0 [when n is in A087686], a(n) = A055938(a(A080677(n)-1)), otherwise [when n is in A088359], a(n) = A005187(1+a(A004001(n)-1)).
As a composition of other permutations:
a(n) = A233276(A276441(n)).
a(n) = A233278(A267111(n)).

A276346 Permutation of natural numbers: a(1) = 1; a(A005187(1+n)) = A088359(a(n)), a(A055938(n)) = A087686(1+a(n)), where A088359 & A087686 = numbers that occur only once & more than once in A004001.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 10, 12, 9, 13, 8, 15, 14, 11, 19, 24, 22, 18, 27, 21, 23, 17, 29, 28, 25, 16, 31, 30, 26, 20, 36, 45, 43, 40, 54, 51, 35, 49, 42, 39, 41, 58, 48, 53, 34, 52, 38, 50, 44, 61, 60, 33, 59, 56, 55, 46, 32, 63, 62, 57, 47, 37, 69, 83, 81, 78, 102, 99, 74, 97, 93, 91, 68, 116, 112, 80, 88, 77, 109, 73, 75, 96, 90
Offset: 1

Views

Author

Antti Karttunen, Sep 03 2016

Keywords

Crossrefs

Inverse: A276345.
Similar or related permutations: A233275, A233277, A267112, A276344, A276442.

Programs

Formula

a(1)=1; for n > 1, if A079559(n)=1 [when n is in A005187], a(n) = A088359(a(A213714(n)-1)), otherwise a(n) = A087686(1+a(A234017(n))).
As a composition of other permutations:
a(n) = A276442(A233275(n)).
a(n) = A267112(A233277(n)).
Previous Showing 31-40 of 240 results. Next