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 51-60 of 74 results. Next

A367009 Number of divisors of n*2^n + 1.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 8, 8, 4, 4, 12, 4, 8, 6, 8, 8, 4, 12, 16, 16, 16, 4, 16, 16, 16, 16, 24, 16, 6, 8, 48, 48, 8, 4, 32, 4, 12, 8, 12, 8, 8, 16, 16, 32, 16, 16, 32, 32, 16, 10, 64, 8, 64, 8, 32, 16, 12, 32, 32, 16, 16, 128, 8, 8, 96, 32, 256, 24, 16, 32, 32, 48
Offset: 0

Views

Author

Sean A. Irvine, Oct 31 2023

Keywords

Comments

The numbers n*2^n+1 are called Cullen numbers.

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0, n*2^n + 1], {n, 0, 100}] (* Amiram Eldar, Jan 06 2024 *)
  • PARI
    a(n) = numdiv(n*2^n + 1); \\ Amiram Eldar, Jan 06 2024

Formula

a(n) = sigma0(n*2^n + 1) = A000005(A002064(n)).

A369324 Array read by ascending antidiagonals: A(n,k) is the number of words of length n on an alphabet [k], avoiding 120 and 210, and sortable by a stack of depth 2, where k >= 0.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 1, 0, 1, 4, 3, 1, 0, 1, 8, 9, 4, 1, 0, 1, 16, 25, 16, 5, 1, 0, 1, 32, 65, 56, 25, 6, 1, 0, 1, 64, 161, 176, 105, 36, 7, 1, 0, 1, 128, 385, 512, 385, 176, 49, 8, 1, 0, 1, 256, 897, 1408, 1281, 736, 273, 64, 9, 1, 0, 1, 512, 2049, 3712, 3969, 2752, 1281, 400, 81, 10, 1
Offset: 0

Views

Author

Stefano Spezia, Jan 20 2024

Keywords

Examples

			The array begins:
  0, 1,  1,   1,   1,    1, ...
  0, 1,  2,   3,   4,    5, ...
  0, 1,  4,   9,  16,   25, ...
  0, 1,  8,  25,  56,  105, ...
  0, 1, 16,  65, 176,  385, ...
  0, 1, 32, 161, 512, 1281, ...
  ...
		

Crossrefs

Cf. A000004 (k=0), A000012 (k=1), A000079 (k=2), A002064 (k=3), A340257 (k=4).
Cf. A000290 (n=2), A001477 (n=1), A057427 (n=0), A131423 (n=3), A164039.
Cf. A000035, A369325 (main diagonal), A369326.

Programs

  • Mathematica
    A[n_,k_]:=(1-(-1)^k)/2+2^n Sum[Binomial[n+k-3-2i,n-1],{i,0,Floor[(k-2)/2]}]; Table[A[n-k,k],{n,0,11},{k,0,n}]//Flatten

Formula

A(n,k) = A000035(k) + 2^n*Sum_{i=0..floor((k-2)/2)} binomial(n + k - 3 - 2*i, n - 1).
Sum_{k=0..n} A(n-k,k) = A164039(n-1).

A373099 Last digit of n*2^n + 1.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This is a cyclic sequence of 20 numbers, using only 1,3,5,7 and 9 (4 times each).

References

  • James Cullen, Question 15897, Educational Times, Vol. 58 (December 1905), p. 534.
  • Richard K. Guy (2004), Unsolved Problems in Number Theory (3rd ed.), New York: Springer Verlag, pp. section B20, ISBN 0-387-20860-7.

Crossrefs

Programs

  • Maple
    lastDigit := proc(n)
        return (n * 2^n + 1) mod 10;
    end proc:
    # Example usage
    minN := 1; maxN := 10;
    lastDigits := [seq(lastDigit(n), n = minN .. maxN)];
    print(lastDigits);
  • Mathematica
    lastDigit[n_] := Mod[n * 2^n + 1, 10]
    (* Example usage *)
    minN = 1; maxN = 10;
    lastDigits = Table[lastDigit[n], {n, minN, maxN}]
    Print[lastDigits]
  • PARI
    a(n) = lift(Mod(n*2^n + 1, 10))
  • Python
    def last_digit(n):
        return (n * 2**n + 1) % 10
    # Example usage
    min_n, max_n = 1, 10
    last_digits = [last_digit(n) for n in range(min_n, max_n + 1)]
    print(last_digits)
    

Formula

a(n) = A010879(A002064(n)).
From Chai Wah Wu, Jul 06 2024: (Start)
a(n) = a(n-2) - a(n-4) + a(n-5) + a(n-6) - a(n-7) - a(n-8) + a(n-9) - a(n-11) + a(n-13) for n > 12.
G.f.: (-3*x^12 - 3*x^11 - 2*x^10 - 4*x^9 + x^8 - 5*x^6 + 2*x^5 + 3*x^4 - 2*x^3 - 8*x^2 - 3*x - 1)/((x - 1)*(x^4 + x^3 + x^2 + x + 1)*(x^8 - x^6 + x^4 - x^2 + 1)). (End)

A383473 Integers k such that d*2^k + 1 is prime for some divisor of k.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 14, 15, 16, 18, 25, 30, 36, 51, 55, 63, 66, 69, 75, 81, 85, 134, 141, 162, 189, 201, 209, 220, 245, 276, 324, 408, 438, 446, 456, 534, 616, 675, 693, 726, 892, 900, 1305, 1326, 1494, 1824, 2208, 2394, 2766, 2826, 3024, 3168, 3189, 3690, 3703, 3880, 3912, 3927, 4410, 4543, 4713
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2025

Keywords

Examples

			6 is in the sequence a term because 3*2^6 + 1 = 193 prime for divisor 3 of k = 6.
		

Crossrefs

Supersequence of A005849.

Programs

  • Magma
    [k: k in [1..900] | not #[d: d in Divisors(k) | IsPrime(d*2^k+1)] eq 0];
    
  • Mathematica
    q[k_] := AnyTrue[Divisors[k], PrimeQ[# * 2^k +1] &]; Select[Range[4000], q] (* Amiram Eldar, Apr 28 2025 *)
  • PARI
    isok(k) = fordiv(k, d, if (ispseudoprime(d*2^k+1), return(1))); return(0); \\ Michel Marcus, Apr 28 2025

A111049 Triangle T(n,k), 0 <= k <= n, read by rows, given by [1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 9, 4, 1, 11, 27, 25, 8, 1, 20, 70, 100, 65, 16, 1, 37, 170, 330, 325, 161, 32, 1, 70, 399, 980, 1295, 966, 385, 64, 1, 135, 917, 2723, 4515, 4501, 2695, 897, 128, 1, 264, 2076, 7224, 14406, 17976, 14364, 7176, 2049, 256
Offset: 0

Views

Author

Philippe Deléham, Oct 07 2005

Keywords

Examples

			Rows begin:
  1;
  1,   1;
  1,   3,    2;
  1,   6,    9,    4;
  1,  11,   27,   25,     8;
  1,  20,   70,  100,    65,    16;
  1,  37,  170,  330,   325,   161,    32;
  1,  70,  399,  980,  1295,   966,   385,   64;
  1, 135,  917, 2723,  4515,  4501,  2695,  897,  128;
  1, 264, 2076, 7224, 14406, 17976, 14364, 7176, 2049, 256;
		

Crossrefs

Programs

  • Mathematica
    With[{m = 9}, CoefficientList[CoefficientList[Series[(1 - 2*x - 2*x*y + x^2 *y + x^2*y^2)/(1 - 3*x - 3*x*y + 2*x^2 + 4*x^2*y + 2*x^2*y^2), {x, 0 , m}, {y, 0, m} ], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • PARI
    T(n, k) = if (k<=n, 2^(n-1)*binomial(n-1, k-1)+binomial(n-1, k));
    matrix(10, 10, n, k, T(n-1, k-1)) \\ to see the triangle \\ Michel Marcus, Feb 17 2020

Formula

T(n, k) = 2^(n-1)binomial(n-1, k-1) + binomial(n-1, k).
Sum_{k=0..n} T(n, k) = 2^(n-1)*(1+2^(n-1)) = A063376(n-1) for n >= 1.
From Peter Bala, Mar 20 2013: (Start)
O.g.f.: (1 - 2*t + x*t*(t-2) + x^2*t^2)/((1 - t*(1+x))*(1 - 2*t*(1+x))) = 1 + (1+x)*t + (1+3*x+2*x^2)*t^2 + ....
E.g.f.: (x + 2*exp((1+x)*t) + x*exp(2*t*(1+x)))/(2*(1+x)) = 1 + (1+x)*t + (1+3*x+2*x^2)*t^2/2! + ....
Recurrence equation: for n >= 1, T(n+1,k) = 2*T(n,k) + 2*T(n,k-1) - binomial(n,k). (End)
From Philippe Deléham, Oct 18 2013: (Start)
G.f.: (1 - 2*x - 2*x*y + x^2*y + x^2*y^2)/(1 - 3*x - 3*x*y + 2*x^2 + 4*x^2*y + 2*x^2*y^2).
T(n,k) = 3*T(n-1,k) + 3*T(n-1,k-1) - 2*T(n-2,k) - 4*T(n-2,k-1) - 2*T(n-2,k-2), T(0,0) = T(1,1) = T(1,0) = T(2,0) = 1, T(2,1) = 3, T(2,2) = 2, T(n,k) = 0 if k > n or if k < 0. (End)

Extensions

Wrong a(42) removed by Georg Fischer, Feb 17 2020

A131837 Multiplicative persistence of Cullen numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

After the 111th term, all the numbers have some digits equal to zero, thus the persistence is equal to 1.

Examples

			Cullen number 65 --> 6*5=30 --> 3*0=0 thus persistence is 2.
		

Crossrefs

Programs

  • Maple
    P:=proc(n) local i,k,w,ok,cont; for i from 0 by 1 to n do w:=1; k:=i*2^i+1; ok:=1; if k<10 then print(0); else cont:=1; while ok=1 do while k>0 do w:=w*(k-(trunc(k/10)*10)); k:=trunc(k/10); od; if w<10 then ok:=0; print(cont); else cont:=cont+1; k:=w; w:=1; fi; od; fi; od; end: P(120);
  • Mathematica
    Table[cn=n*2^n+1;Length[NestWhileList[Times@@IntegerDigits[#]&, cn, #>=10&]], {n, 0, 104}]-1 (* James C. McMahon, Mar 01 2025 *)

Formula

a(n) = A031346(A002064(n)). - Michel Marcus, Mar 01 2025

A131840 Additive persistence of Cullen numbers.

Original entry on oeis.org

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

Views

Author

Keywords

Examples

			Cullen number 385 --> 3+8+5=16 -->1+6=7 thus persistence is 2
		

Crossrefs

Programs

  • Maple
    with(numtheory): with(combinat): P:=proc(n) local a,t;t:=0; a:=n*2^n+1; while a>9 do t:=t+1; a:=convert(convert(a,base,10),`+`); od; t;
    end: seq(P(i),i=1..10^2);
  • Mathematica
    f[n_] := Length@ NestWhileList[Plus @@ IntegerDigits@# &, n*2^n + 1, UnsameQ@## &, All] - 2; Array[f, 88] (* James C. McMahon, Mar 01 2025 *)

Formula

a(n) = A031286(A002064(n)). - James C. McMahon, Mar 01 2025

Extensions

Corrected entries and Maple code by Paolo P. Lava, Dec 19 2017

A137716 Number of digits in the decimal expansion of the n-th Cullen prime.

Original entry on oeis.org

1, 45, 1423, 1749, 1994, 5573, 9726, 9779, 17964, 27347, 79002, 108761, 145072, 407850, 1905090, 2010852
Offset: 1

Views

Author

Ant King, Feb 09 2008

Keywords

Comments

Cullen primes are prime numbers of the form k*2^k+1. This sequence is complete for all values of n up to 3500000.

Examples

			As the sixth Cullen prime, 18496*2^18496 + 1 = 1.311...*10^5572, is a 5573-digit number, we have a(6) = 5573.
		

Crossrefs

Formula

a(n) = A055642(A050920(n)). [Corrected by Georg Fischer, Nov 18 2023]

Extensions

a(15)-a(16) from Amiram Eldar, Oct 27 2024

A143038 Triangle read by rows, A000012 * A134309 * A000012, where A134309 = an infinite lower triangular matrix with (1, 1, 2, 4, 8, 16, ...) in the main diagonal and the rest zeros.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 4, 6, 7, 8, 8, 12, 14, 15, 16, 16, 24, 28, 30, 31, 32, 32, 48, 56, 60, 62, 63, 64, 64, 96, 112, 120, 124, 126, 127, 128, 128, 192, 224, 240, 248, 252, 254, 255, 256, 256, 384, 448, 480, 496, 504, 508, 510, 511, 512
Offset: 0

Views

Author

Gary W. Adamson, Jul 18 2008

Keywords

Comments

Row sums = A002064, the Cullen numbers (1, 3, 9, 25, 65, 161, 385, ...).

Examples

			First few rows of the triangle:
   1;
   1,  2;
   2,  3,  4;
   4,  6 , 7,  8;
   8, 12, 14, 15, 16;
  16, 24, 28, 30, 21, 32;
  32, 48, 56, 60, 62, 63, 64;
  ...
		

Crossrefs

Formula

a(n) = 2^i - 2^(i-1-j)*[jA003056(n), j = A002262(n). - Yuchun Ji, May 15 2020

A146179 Digit sums of Cullen numbers.

Original entry on oeis.org

1, 3, 9, 7, 11, 8, 16, 24, 15, 19, 8, 20, 22, 27, 30, 22, 32, 23, 37, 39, 27, 25, 47, 53, 34, 42, 42, 55, 53, 56, 31, 63, 57, 58, 50, 50, 55, 57, 54, 52, 47, 71, 79, 87, 69, 82, 62, 65, 76, 90, 66, 94, 77, 77, 82, 75, 72, 79, 92, 89, 88, 69, 87, 91, 71, 92, 103, 117, 93, 103
Offset: 1

Views

Author

Parthasarathy Nambi, Oct 27 2008

Keywords

Examples

			The sum of all the digits of the Cullen number 49153 is 22.
		

Crossrefs

Cf. A002064.

Programs

Extensions

More terms from R. J. Mathar, Jul 08 2009
Previous Showing 51-60 of 74 results. Next