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 21-30 of 68 results. Next

A384113 Consecutive states of a linear congruential pseudo-random number generator for MacModula-2 when started at 1.

Original entry on oeis.org

1, 13, 169, 2197, 829, 1533, 1441, 245, 874, 2118, 2113, 2048, 1203, 1773, 2250, 1518, 1246, 21, 273, 1238, 2228, 1232, 2150, 218, 523, 2177, 569, 464, 1410, 2153, 257, 1030, 1835, 745, 441, 1111, 577, 568, 451, 1241, 2267, 1739, 1808, 394, 500, 1878, 1304
Offset: 1

Views

Author

Sean A. Irvine, May 19 2025

Keywords

Comments

An example of a terrible random number generator.
Periodic with period 1155 (well below the modulus 2311).

References

  • Modula Corporation, MacModula-2 System Reference Manual, 1985 (see p. 41).

Crossrefs

Cf. A001022.
Cf. A096550-A096561 other pseudo-random number generators.
Cf. A383809 (another generator with a similar problem).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          irem(13*a(n-1), 2311))
        end:
    seq(a(n), n=1..47);  # Alois P. Heinz, May 21 2025
  • Mathematica
    NestList[Mod[13*#, 2311] &, 1, 100] (* Paolo Xausa, May 22 2025 *)
  • PARI
    my(f=Mod(13,2311)); a(n) = lift(f^((n-1) % 1155)); \\ Kevin Ryde, May 25 2025

Formula

a(n) = 13 * a(n-1) mod 2311.

A100402 Digital root of 4^n.

Original entry on oeis.org

1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7, 1, 4, 7
Offset: 0

Views

Author

Cino Hilliard, Dec 31 2004

Keywords

Comments

Equals A141725 mod 9. - Paul Curtz, Sep 15 2008
Sequence is the digital root of A016777. - Odimar Fabeny, Sep 13 2010
Digital root of the powers of any number congruent to 4 mod 9. - Alonso del Arte, Jan 26 2014
Period 3: repeat [1, 4, 7]. - Wesley Ivan Hurt, Aug 26 2014
From Timothy L. Tiffin, Dec 02 2023: (Start)
The period 3 digits of this sequence are the same as those of A070403 (digital root of 7^n) but the order is different: [1, 4, 7] vs. [1, 7, 4].
The digits in this sequence appear in the decimal expansions of the following rational numbers: 49/333, 490/333, 4900/333, .... (End)

Examples

			4^2 = 16, digitalroot(16) = 7, the third entry.
		

References

  • Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

Crossrefs

Cf. Digital roots of powers of c mod 9: c = 2, A153130; c = 5, A070366; c = 7, A070403; c = 8, A010689.

Programs

Formula

a(n) = 4^n mod 9. - Zerinvary Lajos, Nov 25 2009
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-3) for n>2.
G.f.: (1+4*x+7*x^2)/ ((1-x)*(1+x+x^2)). (End)
a(n) = A010888(A000302(n)). - Michel Marcus, Aug 25 2014
a(n) = 3*A010872(n) + 1. - Robert Israel, Aug 25 2014
a(n) = 4 - 3*cos(2*n*Pi/3) - sqrt(3)*sin(2*n*Pi/3). - Wesley Ivan Hurt, Jun 30 2016
a(n) = A153130(2n). - Timothy L. Tiffin, Dec 01 2023
a(n) = A010888(A001022(n)) = A010888(A009966(n)) = A010888(A009975(n)) = A010888(A009984(n)) = A010888(A087752(n)) = A010888(A121013(n)). - Timothy L. Tiffin, Dec 02 2023
a(n) = A010888(4*a(n-1)). - Stefano Spezia, Mar 20 2025

A175169 Numbers k that divide the sum of digits of 2^k.

Original entry on oeis.org

1, 2, 5, 70
Offset: 1

Views

Author

N. J. A. Sloane, Dec 03 2010

Keywords

Comments

No other terms <= 200000. - Harvey P. Dale, Dec 16 2010
No other terms <= 1320000. - Robert G. Wilson v, Dec 18 2010
There are almost certainly no further terms.

Crossrefs

Sum of digits of k^n mod n: (k=2) A000079, A001370, A175434, A175169; (k=3) A000244, A004166, A175435, A067862; (k=5) A000351, A066001, A175456; (k=6) A000400, A066002, A175457, A067864; (k=7) A000420, A066003, A175512, A067863; (k=8) A062933; (k=13) A001022, A175527, A175528, A175525; (k=21) A175589; (k=167) A175558, A175559, A175560, A175552.

Programs

A175525 Numbers k that divide the sum of digits of 13^k.

Original entry on oeis.org

1, 2, 5, 140, 158, 428, 788, 887, 914, 1814, 1895, 1976, 2579, 2732, 3074, 3299, 3641, 4658, 4874, 5378, 5423, 5504, 6170, 6440, 6944, 8060, 8249, 8915, 9041, 9158, 9725, 9824, 10661, 11291, 13820, 15305, 17051, 17393, 18716, 19589, 20876, 21641, 23756, 24188, 25961, 28409, 30632, 31307, 32387, 33215, 34970, 35240, 36653, 36977, 41558, 43970, 44951, 47444, 51764, 52655, 53375, 53852, 54104, 56831, 57506, 59153, 66479, 68063, 73562, 78485, 79286, 87908, 92093, 102029, 106934, 114854, 116321, 134051, 139397, 184037, 192353, 256469, 281381, 301118, 469004
Offset: 1

Views

Author

T. D. Noe, Dec 03 2010

Keywords

Comments

Almost certainly there are no further terms.
Comments from Donovan Johnson on the computation of this sequence, Dec 05 2010 (Start):
The number of digits of 13^k is approximately 1.114*k, so I defined an array d() that is a little bigger than 1.114 times the maximum k value to be checked. The elements of d() each are the value of a single digit of the decimal expansion of 13^k with d(1) being the least significant digit.
It's easier to see how the program works if I start with k = 2.
For k = 1, d(2) would have been set to 1 and d(1) would have been set to 3.
k = 2:
x = 13*d(1) = 13*3 = 39
y = 39\10 = 3 (integer division)
x-y*10 = 39-30 = 9, d(1) is set to 9
x = 13*d(2)+y = 13*1+3 = 16, y is the carry from previous digit
y = 16\10 = 1
x-y*10 = 16-10 = 6, d(2) is set to 6
x = 13*d(3)+y = 13*0+1 = 1, y is the carry from previous digit
y = 1\10 = 0
x-y*10 = 1-0 = 1, d(3) is set to 1
These steps would of course be inside a loop and that loop would be inside a k loop. A pointer to the most significant digit increases usually by one and sometimes by two for each successive k value checked. The number of steps of the inner loop is the size of the pointer. A scan is done from the first element to the pointer element to get the digit sum.
(End)
No other terms < 3*10^6. - Donovan Johnson, Dec 07 2010

Crossrefs

Sum of digits of k^n mod n: (k=2) A000079, A001370, A175434, A175169; (k=3) A000244, A004166, A175435, A067862; (k=5) A000351, A066001, A175456; (k=6) A000400, A066002, A175457, A067864; (k=7) A000420, A066003, A175512, A067863; (k=8) A062933; (k=13) A001022, A175527, A175528, A175525; (k=21) A175589; (k=167) A175558, A175559, A175560, A175552.

Programs

  • Mathematica
    Select[Range[1000], Mod[Total[IntegerDigits[13^#]], #] == 0 &]

Extensions

a(47)-a(79) from N. J. A. Sloane, Dec 04 2010
a(80)-a(85) from Donovan Johnson, Dec 05 2010

A125816 a(n) = ((1+sqrt(13))^n + (1-sqrt(13))^n)/2.

Original entry on oeis.org

1, 1, 14, 40, 248, 976, 4928, 21568, 102272, 463360, 2153984, 9868288, 45584384, 209588224, 966189056, 4447436800, 20489142272, 94347526144, 434564759552, 2001299832832, 9217376780288, 42450351554560, 195509224472576
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2006

Keywords

Comments

Binomial transform of A001022(powers of 13), with interpolated zeros. - Philippe Deléham, Dec 20 2007
a(n-1) is the number of compositions of n when there are 1 type of 1 and 13 types of other natural numbers. - Milan Janjic, Aug 13 2010

Crossrefs

Cf. A127262. First differences of A091914.

Programs

  • GAP
    a:=[1,1];; for n in [3..30] do a[n]:=2*a[n-1]+12*a[n-2]; od; a; # G. C. Greubel, Aug 02 2019
  • Magma
    I:=[1,1]; [n le 2 select I[n] else 2*Self(n-1) +12*Self(n-2): n in [1..30]]; // G. C. Greubel, Aug 02 2019
    
  • Mathematica
    Expand[Table[((1+Sqrt[13])^n +(1-Sqrt[13])^n)/(2), {n,0,30}]] (* Artur Jasinski *)
    LinearRecurrence[{2,12}, {1,1}, 30] (* G. C. Greubel, Aug 02 2019 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-2*x-12*x^2)) \\ G. C. Greubel, Aug 02 2019
    
  • Sage
    ((1-x)/(1-2*x-12*x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Aug 02 2019
    

Formula

From Philippe Deléham, Dec 12 2006: (Start)
a(n) = 2*a(n-1) + 12*a(n-2), with a(0)=a(1)=1.
G.f.: (1-x)/(1-2*x-12*x^2). (End)
a(n) = Sum_{k=0..n} A098158(n,k)*13^(n-k). - Philippe Deléham, Dec 20 2007
If p[1]=1, and p[i]=13, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1,(i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n+1)=det A. - Milan Janjic, Apr 29 2010

A175552 Numbers k such that the digit sum of 167^k is divisible by k.

Original entry on oeis.org

1, 2, 5, 7, 22, 490, 724, 778, 868, 994, 1109, 1390, 1415, 1462, 1642, 1739, 1829, 2146, 2362, 3136, 4954, 6437, 6628, 7103, 11200, 12424, 12863, 14242, 14249, 15059, 15203, 16222, 17140, 18353, 19192, 21233, 22853, 24106, 24574, 24833, 26896, 27652, 28253, 30323, 31306, 31594, 32386, 33790, 34985, 36184, 36310, 40673, 42196, 43931, 45911, 45983
Offset: 1

Views

Author

N. J. A. Sloane, Dec 03 2010

Keywords

Comments

From Donovan Johnson, Dec 03 2010: (Start)
To generate the additional terms I used PFGW.exe to get the decimal expansion for each number of the form 167^n (n <= 50000). Then I wrote a program in powerbasic to read the pfgw.out file and get the digit sums.
The digit sum is 10 times the n value for terms a(5) to a(56). (End)
I believe that this sequence is finite. - N. J. A. Sloane, Dec 05 2010

Crossrefs

Sum of digits of k^n mod n: (k=2) A000079, A001370, A175434, A175169; (k=3) A000244, A004166, A175435, A067862; (k=5) A000351, A066001, A175456; (k=6) A000400, A066002, A175457, A067864; (k=7) A000420, A066003, A175512, A067863; (k=8) A062933; (k=13) A001022, A175527, A175528, A175525; (k=21) A175589; (k=167) A175558, A175559, A175560, A175552.

Programs

  • Mathematica
    Select[Range[10000], Mod[Total[IntegerDigits[167^#]], #] == 0 &]

Extensions

a(25)-a(56) from Donovan Johnson, Dec 03 2010

A319075 Square array T(n,k) read by antidiagonal upwards in which row n lists the n-th powers of primes, hence column k lists the powers of the k-th prime, n >= 0, k >= 1.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 9, 5, 1, 16, 27, 25, 7, 1, 32, 81, 125, 49, 11, 1, 64, 243, 625, 343, 121, 13, 1, 128, 729, 3125, 2401, 1331, 169, 17, 1, 256, 2187, 15625, 16807, 14641, 2197, 289, 19, 1, 512, 6561, 78125, 117649, 161051, 28561, 4913, 361, 23, 1, 1024, 19683, 390625, 823543, 1771561, 371293
Offset: 0

Views

Author

Omar E. Pol, Sep 09 2018

Keywords

Comments

If n = p - 1 where p is prime, then row n lists the numbers with p divisors.
The partial sums of column k give the column k of A319076.

Examples

			The corner of the square array is as follows:
         A000079 A000244 A000351  A000420    A001020    A001022     A001026
A000012        1,      1,      1,       1,         1,         1,          1, ...
A000040        2,      3,      5,       7,        11,        13,         17, ...
A001248        4,      9,     25,      49,       121,       169,        289, ...
A030078        8,     27,    125,     343,      1331,      2197,       4913, ...
A030514       16,     81,    625,    2401,     14641,     28561,      83521, ...
A050997       32,    243,   3125,   16807,    161051,    371293,    1419857, ...
A030516       64,    729,  15625,  117649,   1771561,   4826809,   24137569, ...
A092759      128,   2187,  78125,  823543,  19487171,  62748517,  410338673, ...
A179645      256,   6561, 390625, 5764801, 214358881, 815730721, 6975757441, ...
...
		

Crossrefs

Other rows n: A030635 (n=16), A030637 (n=18), A137486 (n=22), A137492 (n=28), A139571 (n=30), A139572 (n=36), A139573 (n=40), A139574 (n=42), A139575 (n=46), A173533 (n=52), A183062 (n=58), A183085 (n=60), A261700 (n=100).
Main diagonal gives A093360.
Second diagonal gives A062457.
Third diagonal gives A197987.
Removing the 1's we have A182944/ A182945.

Programs

  • PARI
    T(n, k) = prime(k)^n;

Formula

T(n,k) = A000040(k)^n, n >= 0, k >= 1.

A105317 Powers of Fibonacci numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 9, 13, 16, 21, 25, 27, 32, 34, 55, 64, 81, 89, 125, 128, 144, 169, 233, 243, 256, 377, 441, 512, 610, 625, 729, 987, 1024, 1156, 1597, 2048, 2187, 2197, 2584, 3025, 3125, 4096, 4181, 6561, 6765, 7921, 8192, 9261, 10946, 15625, 16384, 17711
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 25 2005

Keywords

Comments

The subset of nontrivial Fibonacci powers [numbers A000045(k)^n which are not in A000045] starts 4, 9, 16, 25, 27, 32, 64, 81, 125, 128, 169, 243, 256, 441, 512, 625, 729, 1024, 1156... - R. J. Mathar, Jan 26 2015. These are the initial terms of A254719. - Reinhard Zumkeller, Feb 06 2015

Examples

			2197 = 13^3 = A000045(7)^3, therefore 2197 is a term.
		

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a105317 n = a105317_list !! (n-1)
    a105317_list = 0 : 1 : h 1 (drop 4 a000045_list) (singleton (2, 2)) where
      h y xs'@(x:xs) s
        | x < ff    = h y xs (insert (x, x) s)
        | ff == y   = h y xs' s'
        | otherwise = ff : h ff xs' (insert (f * ff, f) s')
        where ((ff, f), s') = deleteFindMin s
    -- Reinhard Zumkeller, Feb 06 2015
    
  • Maple
    N:= 10^6: # to get all terms <= N
    select(`<=`,{0,1,seq(seq(combinat:-fibonacci(i)^j, i = 3 ..floor(log[phi](sqrt(5)*N^(1/j)+1))),j=1..ilog2(N))},N);
    # if using Maple 11 or earlier, uncomment the next line
    # sort(convert(%,list)); # Robert Israel, Jan 26 2015
  • Mathematica
    lim = 10^5; t = Table[f = Fibonacci[n]; f^Range[Floor[Log[lim]/Log[f]]], {n, 3, Ceiling[Log[GoldenRatio, lim] + 1]}]; Union[{0, 1}, Flatten[t]] (* T. D. Noe, Sep 27 2011 *)
  • PARI
    list(lim)=my(v=List([0]),k=1,f,t); while(k<=lim, listput(v,k); k*=2); k=3; while(k<=lim, listput(v,k); k*=3); k=5; while(k<=lim, listput(v,k); k*=5); k=6; while((f=fibonacci(k++))<=lim, t=1; while((t*=f)<=lim, listput(v,t))); Set(v) \\ Charles R Greathouse IV, Oct 03 2016

A141012 a(0) = 0, a(n) = 13^(n-1) + 1.

Original entry on oeis.org

0, 2, 14, 170, 2198, 28562, 371294, 4826810, 62748518, 815730722, 10604499374, 137858491850, 1792160394038, 23298085122482, 302875106592254, 3937376385699290, 51185893014090758
Offset: 0

Views

Author

R. J. Mathar, Jul 11 2008

Keywords

Programs

  • Mathematica
    Join[{0},13^(#-1)+1&/@Range[20]] (* or *) Join[{0},LinearRecurrence[ {14,-13},{2,14},20]] (* Harvey P. Dale, Oct 14 2013 *)

Formula

E.g.f.: Sum_{d|M} (exp(d*x) - 1)/d, M=13.
From R. J. Mathar, Mar 05 2010: (Start)
a(n) = Sum_{d|13} d^(n-1) = 1 + 13^(n-1) = 1 + A001022(n-1), n > 0.
a(n) = 14*a(n-1) - 13*a(n-2), n > 2.
G.f.: -2*x*(-1+7*x)/((13*x-1)*(x-1)). (End)
a(n) = 13*a(n-1) - 12, n > 1. - Vincenzo Librandi, Sep 17 2011

Extensions

Name changed by Arkadiusz Wesolowski, Sep 08 2013

A009983 Powers of 39.

Original entry on oeis.org

1, 39, 1521, 59319, 2313441, 90224199, 3518743761, 137231006679, 5352009260481, 208728361158759, 8140406085191601, 317475837322472439, 12381557655576425121, 482880748567480579719, 18832349194131742609041, 734461618571137961752599, 28644003124274380508351361
Offset: 0

Views

Author

Keywords

Comments

Same as Pisot sequences E(1, 39), L(1, 39), P(1, 39), T(1, 39). Essentially same as Pisot sequences E(39, 1521), L(39, 1521), P(39, 1521), T(39, 1521). See A008776 for definitions of Pisot sequences.
The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 1, a(n) equals the number of 39-colored compositions of n such that no adjacent parts have the same color. - Milan Janjic, Nov 17 2011

Crossrefs

Programs

Formula

G.f.: 1/(1-39*x). - Philippe Deléham, Nov 24 2008
a(n) = 39^n; a(n) = 39*a(n-1), a(0)=1. - Vincenzo Librandi, Nov 21 2010
From Elmo R. Oliveira, Jul 09 2025: (Start)
E.g.f.: exp(39*x).
a(n) = A063941(n)/17 = A000244(n)*A001022(n). (End)
Previous Showing 21-30 of 68 results. Next