text:
Mataram Kingdom

The Mataram Kingdom (, ꦩꦠꦫꦩ꧀, ); also known as Medang Kingdom was a Javanese Hindu-Buddhist kingdom that flourished between the 8th and 11th centuries. It was based in Central Java, and later in East Java. Established by King Sanjaya, the kingdom was ruled by the Shailendra dynasty and Ishana dynasty.

During most of its history the kingdom seems to have relied heavily on agriculture, especially extensive rice farming, and later also benefited from maritime trade. According to foreign sources and archaeological findings, the kingdom seems to have been well populated and quite prosperous. The kingdom developed a complex society, had a well developed culture, and achieved a degree of sophistication and refined civilisation.

In the period between the late 8th century and the mid-9th century, the kingdom saw the blossoming of classical Javanese art and architecture reflected in the rapid growth of temple construction. Temples dotted the landscape of its heartland in Mataram. The most notable of the temples constructed in Mataram are Kalasan, Sewu, Borobudur and Prambanan, all quite close to the present-day city of Yogyakarta. At its peak, the kingdom had become a dominant empire that exercised its power—not only in Java, but also in Sumatra, Bali, southern Thailand, Indianized kingdoms of the Philippines, and the Khmer in Cambodia.

Later the dynasty divided into two kingdoms identified by religious patronage—the Buddhist and Shaivite dynasties. Civil war followed. The outcome was that the Mataram kingdom was divided into two powerful kingdoms; the Shaivite dynasty of Mataram kingdom in Java led by Rakai Pikatan and the Buddhist dynasty of Srivijaya kingdom in Sumatra led by Balaputra. Hostility between them did not end until 1016 when the Shailendra clan based in Srivijaya incited a rebellion by Wurawari, a vassal of the Mataram kingdom, and sacked the capital of Watugaluh in East Java. Srivijaya rose to become the undisputed hegemonic empire in the region. The Shaivite dynasty survived, reclaimed east Java in 1019, and then established the Kahuripan kingdom led by Airlangga, son of Udayana of Bali.

Historiography
In the early 19th century, the discovery of numerous ruins of great monuments—such as Borobudur, Sewu and Prambanan—which dominated the landscape of the Kedu and Kewu plains in Yogyakarta and Central Java, caught the attention of some historians and scholars in the colonial Dutch East Indies. This spurred archaeological studies to uncover the history of this ancient civilisation.

The history of the Mataram area as the capital of the Central Javanese Mataram kingdom is also part of the historical Yavadvipa or Bhumijava (the land of Java), and the classical Javanese civilisation. The Indians collectively called them Yawadvipa, the Khmer referred to them as Chvea, the Chinese called them Shepo, Chopo or Chao-wa, the Arabs called them Jawi, Jawah or Zabag, and Srivijayan refer to them as Bhumijava. The native Javanese most often refer to their lands and country simply as Jawi (Java), while the name of their nagara (country) is often based on their capital. The only foreign source mentioning Mdaη was found in the Philippines inscription, dated 822 saka (900). There are no comprehensive written records that have survived in Java except numbers of prasasti (inscriptions) written on stones or copper plates. These inscriptions most often recorded the political and religious deeds of the rulers. The most common theme mentioned in inscriptions is the establishment of Sima (taxed rice cultivation land recognised through royal edict), and sometimes some portion or the whole of tax collected from this Sima land is appointed to fund the construction and maintenance of religious building. Nevertheless, some local legends and historical records, written on lontar—most often dated from later period—might also provides data and source to reconstruct the historical event.

Native Javanese mythology and beliefs composed in the Mataram Sultanate era (circa 17th century), but probably originating from an earlier period, mentioned a semi-mythological kingdom named Medang Kamulan, which in Javanese translates to "Medang the origin" kingdom. The kingdom is mentioned in the myth of Dewi Sri and also Aji Saka. This is probably the remnant of vague native Javanese collective memory of the existence of an ancient kingdom called "Medang".

Current knowledge of historical Javanese civilisation is thus primarily derived from:
 * Archaeological excavations, reconstruction and investigation of ancient structures, especially candi (temples), and also the discovery of ancient relics, such as the Wonoboyo hoard.
 * Inscriptions, either stone or copper plate, most common are those which mention the establishment of sima agricultural village or the funding of temples, which report on the political and religious deeds of the kings, or stating their lineage; the most notable are the Canggal, Kalasan, Shivagrha and Balitung charter.
 * Bas reliefs in a series of temple walls with depictions of life in the palace, village, temple, ship, marketplace and also the everyday lives of the population. The most notable are the bas reliefs found on Borobudur and Prambanan temple.
 * Native manuscripts mentioning stories of kings, their deeds and exploits, that somehow link across to accounts mentioned in stone inscriptions. The notable example is the Carita Parahyangan.
 * Reports and chronicles of foreign diplomats, traders and travellers, mainly from Chinese, Indian, and Arab sources.

Etymology
Mataram is the name in Sanskrit: मातरम्।, mātaram. Taken from the word मातृ mātṛ meaning "mother", has the same meaning as मातृभूमि mātṛbhūmi meaning "motherland". In the inscription it is referred to as kaḍatwan śrī mahārāja i bhūmi i mātaram, a phrase which means "Maharaja's kingdom in Mataram", as a form of mother personification which symbolises life, nature and the environment.

The name of the Mataram Kingdom was known during the reign of Sanjaya (narapati rāja śrī sañjaya) which states in the Canggal inscription, dated from 654 Śaka or 732 AD, that he ruled in Java island (āsīddvīpavaraṁ yavākhyam). Then according to Mantyasih inscription in 829 Śaka or 907 AD he was called by a different title (saŋ ratu sañjaya). The name of the Mataram Kingdom was first discovered by epigraphy in Wuatan Tija inscription 802 Śaka or 880 AD (dewatā prasiddha maṅrakṣa kaḍatwan śrī mahārāja i bhūmi i mātaram kita). The inscription data mentions a number of place names as the center of government located in Central Java, including Shivagrha inscription 778 Śaka or 856 AD and Mantyasih inscription 829 Śaka or 907 AD. The inscription shows the names of places and their hierarchy, namely Mamratipura and Poh Pitu.

The name Medang then emerged from various inscriptions not only in Central Java but even in East Java. The name identifies that the Medang palace is located in the territory of the Mataram Kingdom. The etymology of the name "Medang" might be derived from a local name of the hardwood "medang" tree which refer to trees of the genus Phoebe.

Until the reign of East Java the name Mataram was still found in inscriptions, including Turyan inscription 851 Śaka or 929 AD (kaḍatwan śrī mahārāja bhūmi mātaram kita pinakahurip niŋ rāt kabaiḥ) the capital city of Mataram is located in Tamwlang (śrī mahārāja makaḍatwan i tāmwlaŋ), later mentioned in Paradah inscription in 865 Śaka or 943 AD that the location of the capital city of Mataram has moved in Watugaluh (śrī mahārāja makaḍatwan i bhūmi mātaram i watugaluḥ) and Wwahan inscription 907 Śaka or 995 AD also reveals about the location of the new capital city of Mataram, namely in Watugaluh, this kingdom is still called Mataram (mātaram riŋ watugaluḥ), even though the center of his kingdom had moved to East Java. From that long period of time, until now it can be known again from various inscriptions that give an overview of the structure of the Mataram Kingdom as already mentioned.

The name "Mataram" was originally known in the 8th century as a Hindu-Buddhist kingdom then the name reappeared in the 16th century as one of the Islamic kingdom or known as Mataram Sultanate. As a result, the historiography of this kingdom is referred to as Ancient Mataram to distinguish it from Islamic Mataram.

This historic Javanese Kingdom of Mataram should not be confused with the Mataram city located on Lombok island, currently the capital of West Nusa Tenggara province. The latter was actually the royal capital of the Cakranegara, a branch of Balinese Karangasem nobles that colonised Lombok in the early 19th century. Indeed, Lombok's Mataram city was named after the historic region of Mataram in Java, as it is a common practice for Balinese to name their settlements after their Javanese heritage.

Formation and growth
The earliest account of the Mataram Kingdom is in the Canggal inscription, dated 732, discovered within the compound of Gunung Wukir temple in Canggal village, southwest of the town of Magelang. This inscription, written in Sanskrit using the Pallava script, tells of the erection of a lingga (a symbol of Shiva) on the hill in the Kunjarakunja area, located on a noble island called Yawadwipa (Java) which had an abundance of rice and gold. The establishment of lingga was under the order of Rakai Mataram Sang Ratu Sanjaya (King Sanjaya Rakai (lord) of Mataram). This inscription tells that Yawadwipa was ruled by King Sanna, whose long reign was marked by wisdom and virtue. After Sanna died, the kingdom fell into disunity. Sanjaya, the son of Sannaha (Sanna's sister) ascended to the throne. He conquered the areas around his kingdom, and his wise reign led to peace and prosperity for all of his subjects.

It seemed that Sanjaya came to power c. 717 CE; that was the starting year of Sanjaya chronicle used in King Daksa's inscription far later in early 10th-century. According to Canggal inscription, Sanjaya established a new kingdom in Southern Central Java. And yet it seems to be the continuation of earlier polity ruled by King Sanna, Sanjaya's uncle. This earlier polity is linked to the earlier temple structures in Dieng Plateau, in the northern part of Central Java, which is the oldest surviving structure found in Central Java. The earlier kingdom linked as the predecessor of Mataram kingdom is Kalingga, located somewhere in Central Java northern coast.

The story of Sanna and Sanjaya are also described in the Carita Parahyangan, a book from a later period composed around late 16th-century, which mainly describes the history of Pasundan (the Sunda Kingdom). However, in this book, Sanjaya is described as Sanna's son, rather than his nephew. It also mentions that Sanna was defeated by Purbasora, King of Galuh, and retreated to Mount Merapi. So, to avenge the defeat of his father, Sanjaya attacked Galuh and killed Purbasora and his family. Afterwards, Sanjaya reclaimed Sanna's kingdom and ruled West Java, Central Java, East Java, and Bali. He also battled the Malayu and Keling (against their king, Sang Srivijaya). Although the manuscript seems to be romanticised, vague and not providing certain details on the period, nevertheless the almost exact name and theme of the story with historical Canggal inscription seems to confirm that the manuscript was based or inspired from the historical event.

Other than Gunung Wukir temple, it was probably during Sanjaya reign, that several Hindu temples were constructed in Muntilan and Mataram area on the slopes of Mount Merapi, such as Banon, Gunungsari, Kadisoka and Gebang temples. Those Hindu temples are estimated was built during early Mataram Kingdom era circa 8th century.

Golden age
The period between the reign of King Panangkaran to King Balitung (span between 760 and 910) that roughly lasted for 150 years, marked the apogee of Javanese classic civilisation. This period witnessed the blossoming of Javanese art and architecture, as numbers of majestic temples and monuments were erected and dominated the skyline of Kedu and Kewu Plain. Most notable of these temples are Sewu, Borobudur and Prambanan temple. The Shailendras are known as ardent temple builders.

King Sanjaya was a Shaivite, and yet his successor Panangkaran was a Mahayana Buddhist. This shift of faith, from Shaivite Sanjaya to Buddhist Panangkaran has raised problematic questions among scholars; whether there were two competing royal families that dominated the political landscapes in Central Java, that each are patrons of either Shaivite Hinduism or Mahayana Buddhism. Or more recently suggested theory, that there were only one dynasty—the Shailendras—and there was only the shift or split of royal patronage in favour to Hinduism or Buddhism.

The great builder

Panangkaran (r. 760–780) was an enthusiastic developer, he was credited for at least five major temple projects conducted and started during his reign. According to the Kalasan inscription, dated 778 and written in the Pranagari script in Sanskrit, the Kalasan temple was erected by the will of Guru Sang Raja Sailendravamçatilaka (the teacher of the ornament of Sailendra family), who persuaded Panangkaran (Sanjaya's successor) to construct a holy building for the goddess (boddhisattvadevi) Tara and build a vihara (monastery) for Buddhist monks from the Shailendra realm. Panangkaran also awarded Kalaça village to a sangha (Buddhist monastic community). The temple connected to this inscription is the Kalasan temple that housed the image of Tara, and the nearby Sari temple that was probably functioned as the monastery.

Panangkaran was also responsible for the construction of Abhayagiri Vihara, connected to the present-day of Ratu Boko. This hilltop compound was actually not a religious structure; consist of series of gates, ramparts, fortified walls, dry moats, walled enclosure, terraces and building bases. This site displays attributes of an occupation or settlement site, although its precise functions is unknown. This led to a suggestion that this compound probably was served as the palace. Initially it was likely intended as a secluded hilltop Buddhist monastery, as mentioned in the Abhayagiri Vihara inscription. However, later it seems to be converted to become a fortified palace or a citadel, which evidence in the remnant of defensive structures.

King Panangkaran probably also responsible to the conception and laid the foundation for the construction of grand Manjusrigrha temple, as mentioned in Manjusrigrha inscription dated 792. The king, however, never saw the completion of this grand temple complex, as it finished in 792, long after his death probably around 780. This massive temple complex with total of 249 structures was the grandest of its time, and probably served as the official state's temple that conducted important stately religious ceremonies.

The great conqueror

There are some reports that naval Javanese raiders invaded Tran-nam in 767, Champa in 774, and Champa again in 787. The successor of Panangkaran was Dharanindra (r. 780–800) or commonly known as King Indra. He was mentioned in Kelurak inscription (dated 782) in his formal reign name Sri Sanggrama Dhananjaya. In this inscription, he was hailed as Wairiwarawiramardana or "the slayer of courageous enemies". The similar title also found in Ligor B inscription discovered in Southern Thailand Malay Peninsula; Sarwwarimadawimathana, which suggest it referred to the same person. Dharanindra seems to be a valiant and warlike character, as he embarked on military naval expedition overseas and has brought Shailendras' control on Ligor in Malay Peninsula.

King Indra seems to continue the builder tradition of his predecessor. He continued the construction of Manjusrigrha temple (Sewu complex), and according to the Karangtengah inscription (dated 824) responsible for the construction of Venuvana temple, connected to Mendut or probably Ngawen temple. He was also probably responsible for the conception and initiation of the construction of Borobudur and Pawon temple.

Dharanindra ascends as the Maharaja of Srivijaya. The nature of Shailendras' close relations with the neighbouring Srivijayan empire based on Sumatra is quite uncertain and complicated. It seems that in earlier times, Shailendra family belonged within Srivijayan mandala sphere of influence. And for a later period of time, Shailendras' monarch rose to become the head of Srivijayan mandala. The shift that rendered Shailendras in return to become the ruler of Srivijaya was unclear. Was it led by military campaign by Dharanindra against Srivijaya in Sumatra, or more likely formed by close alliance and kinship between the house of Shailendra and the Maharaja of Srivijaya. Arabic sources mentioned that Zabag (Java) ruled over Sribuza (Srivijaya), Kalah (a place in the Malay peninsula, probably Kedah), and Ramni (a place in Sumatra, probably Lambri). Based on the Ligor inscription, Laguna copperplate inscription and Pucangan inscription, the influence and knowledge of the Medang Kingdom reached as far as Bali, southern Thailand, the kingdoms in the Philippine islands, and the Khmer in Cambodia. In 851 an Arabic merchant named Sulaimaan recorded an event about Javanese Sailendras staging a surprise attack on the Khmers by approaching the capital from the river, after a sea crossing from Java. The young Khmer king was later punished by the Maharaja, and subsequently, the kingdom became a vassal of the Sailendra dynasty.

In 916 CE, Abu Zaid Hasan mentioned that a polity called Zabag invaded the Khmer kingdom, using 1000 "medium-sized" vessels, which resulted in a Zabag victory. The head of the Khmer king was then brought to Zabag. Regardless of whether the story was true or not or just a legend, it may have a connection with the independence of Cambodia from Javanese suzerainty in 802 CE. Zabag might corresponds to Jawaka/Javaka, which may refer to Java or South Sumatra.

The pacifist ruler
Dharanindra's successor was Samaragrawira (r. 800–819), mentioned in Nalanda inscription (dated 860) as the father of Balaputra, and the son of Śailendravamsatilaka (the ornament of Śailendra family) with stylised name Śrīviravairimathana (the slayer of enemy hero), which refer to Dharanindra. Unlike his predecessor the expansive warlike Dharanindra, Samaragrawira seems to be a pacifist, enjoying a peaceful prosperity of interior Java in Kedu Plain, and more interested on completing the Borobudur project. It was in these years, at the beginning of the ninth century, that the Khmer prince Jayavarman was appointed governor of Indrapura in the Mekong delta under Shailendran rule. This decision was proven as a mistake, as Jayavarman later revolted, moved his capital further inland north from Tonle Sap to Mahendraparvata, severed the link and proclaimed Cambodian independence from Java in 802. Samaragrawira was mentioned as the king of Java that married Tārā, daughter of Dharmasetu. He was mentioned as his other name Rakai Warak in Mantyasih inscription.

Earlier historians, such as N. J. Krom, and Coedes, tend to equate Samaragrawira and Samaratungga as the same person. However, later historians such as Slamet Muljana equate Samaratungga with Rakai Garung, mentioned in Mantyasih inscription as the fifth monarch of Mataram kingdom. Which means Samaratungga was the successor of Samaragrawira.

Samaratungga (r. 819–838) was credited for the completion of massive stone mandala, the grand monument of Borobudur (completed in 825). Samaratungga just like Samaragrawira, seems to be deeply influenced by peaceful Mahayana Buddhist beliefs and strive to become a pacifist and a benevolent ruler. His successor was Princess Pramodhawardhani that betrothed to Shaivite Rakai Pikatan, son of the influential Rakai Patapan, a landlord in Central Java. The political move that seems as an effort to secure peace and Shailendran rule on Java by reconciling the Mahayana Buddhist with Shaivite Hindus.

The rule of Shaivite Rakai Pikatan (r. 838–850) and his Buddhist queen consort Pramodhawardhani marked the return of the Mataram Mataram court favour to Shaivite Hindus, instead of Mahayana Buddhism favoured by previous king Samaratungga. This is evident in the construction of grand Shivagrha temple compound in the Mataram capital, located only few hundred metres south from Manjusrigrha temple compound. Nevertheless, the inter-religious relations during Pikatan's reign seems to promote tolerance in the spirit of reconciliation. Their reign is credited to the construction and expansion of at least two of perwara temple and stupa in Plaosan complex, located east from Sewu (Manjusrigrha) temple. Plaosan temple with twin main temples is probably built and dated from an earlier period, probably started by Panangkaran, Samaragrawira or Samaratungga, but completed during Pikatan-Pramodhawardhani's reign. Several of the perwara (ancillary) temples and stupas in Plaosan complex bears some inscription of anumoda ("rejoicing" through donation) such as Anumoda śrī Kahulunan and Asthupa śrī mahārāja Rakai Pikatan.

The divide
Balaputra however, opposed the rule of Pikatan and Pramodhawardhani. The relations between Balaputra and Pramodhawardhani is interpreted differently by some historians. Older theory according to Bosch and De Casparis holds that Balaputra was the son of Samaratungga, which means he was the younger brother of Pramodhawardhani. Later historians such as Muljana on the other hand, argued that Balaputra was the son of Samaragrawira and the younger brother of Samaratungga, which means he was the uncle of Pramodhawardhani.

It is not known whether Balaputra was expelled from Central Java because of succession dispute with Pikatan, or was he already ruled in Suvarnadvipa (Sumatra). Either ways, it seems that Balaputra eventually ruled the Sumatran branch of Shailendra dynasty and enthroned in Srivijayan capital of Palembang. Historians argued that this was because Balaputra's mother—Tara, the queen consort of King Samaragrawira was the princess of Srivijaya, this rendered Balaputra as the heir of Srivijayan throne. Balaputra the Maharaja of Srivijaya later stated his claim as the rightful heir of Shailendra dynasty from Java, as proclaimed in Nalanda inscription dated 860. The Shivagrha inscription (dated 856) mentioned about a war challenging Pikatan's reign, the inscription, however, did not mention who was the enemy that challenged Pikatan's authority. The earlier historians suggest that it was Balaputra that rose against Pikatan, however, later historians suggest it was another enemy, argued by that time Balaputra already ruled in Srivijaya. The Shivagrha inscription only mentioned that the battle happened in a fortress on a hill protected by bulk of stone walls, this fortress hill is identified with Ratu Boko archaeological site. The eldest children of Pikatan and Pramodhawardhani was Rakai Gurunwangi Dyah Saladu.

Eventually the revolt was successfully defeated by Pikatan's youngest son—the valiant Dyah Lokapala also known by his title 'Lord of (Rakai) Kayuwangi'. As the reward for his heroic deed and bravery, the people and many of Pikatan's state advisors urged that Lokapala should be named as crown prince instead of Gurunwangi. Gurunwangi's loss of favour in succession—despite being the eldest sibling, has raised a question among scholars. It was previously thought that the name Rakai Gurunwangi Dyah Saladu refer to a female character (princess), although it is more likely that Gurunwangi was a prince. This revolt seems to have succeeded in taking over the capital in Mataram for a certain period. After defeating the usurper, Pikatan found that this bloodshed has made the capital in Mataram inauspicious, thus he moved the karaton (court) to Mamrati or Amrati located somewhere in Kedu Plain (Progo river valley), northwest from Mataram.

According to the Shivagrha inscription, a public water project to change the course of a river near Shivagrha temple was undertaken during the construction of the temple. The river, identified as the Opak River, now runs north to south on the western side of the Prambanan temple compound. Historians suggest that originally the river was curved further to east and was deemed too near to the main temple. Experts suggest that the shift of the river was meant to secure the temple complex from the overflowing of lahar volcanic materials from Merapi volcano.

Later Pikatan decided to abdicate his throne in favour of his youngest son Dyah Lokapala (r. 855–885). Rakai Pikatan retired, renounce worldly affairs and become a hermit named Sang Prabhu Jatiningrat. The event also marked with the consecrated ceremony of Shiva image in Prambanan main temple. Boechari suggests that the enemy that challenged Pikatan was Rakai Walaing pu Kumbhayoni, a powerful Shaivite landlord and also the branch of the ruling dynasty as he claimed as the descendant of a king that ruled Java.

Consolidation (855–898)
King Lokapala (r. 855–885) was a patron of Shaivite Hinduism, "after the decline of the power of the Buddhist Shailendras in central Java." His reign seems to enjoyed a relative peace. The grand Shivagrha temple compound was continuously expanded and completed with hundreds of perwara (complementary) temples surrounding the main three prasada (tower) associated with the Trimurti Hindu Gods.

It was probably during Lokapala's reign that several important Hindu temples were constructed in the Prambanan-Klaten area, such as Sambisari, Kedulan and Barong. Also Hindu temples on the slopes of Merapi volcano; Lumbung Sengi and Asu are possibly constructed during this era. Several Buddhist temples possibly also constructed during his reign, such as Banyunibo and Sajiwan temples. The Buddhist temple of Sajiwan is connected to Nini Haji Rakryan Sanjiwana which refer to Queen Mother Pramodhawardhani. The temple is highly possible her pedharmaan or mortuary temple dedicated by her son, King Lokapala or by her descendants. King Pikatan, Lokapala (Rakai Kayuwangi), and Watuhumalang ruled from their court in Mamrati or Amrati, they are known as "Amrati Kings". The exact location of Mamrati is unknown, suggested somewhere in Kedu Plain (modern day Magelang and Temanggung regencies), located north from Mataram along Progo River valley. It was suggested that Amrati might be located near the location of Wanua Tengah III inscription, in Kedunglo hamlet, Kaloran village, within Temanggung Regency.

After being absent for several generations, the name "Mataram" reappears in Javanese inscription during the reign of Balitung, which probably signify the transfer of capital. King Balitung moved his capital from Amrati to Poh Pitu, and renamed Poh Pitu as Yawapura. Again the exact location of this capital is unknown, probably also located within Kedu Plain. However, it is highly possible that Poh Pitu was located around the Poh inscription (905), in Dumpoh hamlet, Potrobangsan village, North Magelang district within Magelang city. After king Lokapāla's death in 885, the kingdom underwent a period of political turbulence: the period 885–887 saw three different kings in succession: king Tagwas, king Devendra (lord of Panumwanan), and king Bhadra (lord of Gurunwangi). For the next seven years (887–894), the kingdom had no single ruler. Rival claims to the throne in this period are illustrated in Bhadra's stele of Munggu Antan (887) and Devendra's Poh Dulur inscription (890). After the short reign of Jebang, lord of Watu Humalang (r. 894–898), Balitung emerged as the leading contender for the throne of Java, and reunited the kingdom for the first time since Lokapāla's death.

Expansion to East Java (898–928)
Balitung came to the throne on 10 May 898 and ruled for approximately 12 years. He centralised royal authority and restricted the autonomy of aristocrats, supported both Hindu and Buddhist foundations, and for the first time, incorporated parts of east Java into the Mataram kingdom. The historian Wisseman Christie described the extent of Balitung's influence: "from the Cilacap region in the far southwest and Pekalongan in the northwest, through the Banjarnegara and Bagawanta valley region, the full length of the Progo valley—from Kedu to the south coast, the Yogyakarta-Prambanan-Klaten core region, the upper Solo valley and Gunung Kidul region, to the upper Madiun river valley and the slopes of Mount Wilis, to the Blitar and Pare regions of the upper Brantas valley, the Malang highlands and the Brantas delta in the east." Balitung prolifically issued inscriptions, among others the Telahap (dated 11 September 899), Tiga Ron (30 March 900), Watukura (27 July 902), Telang (11 January 904), Poh (17 July 905), Kubu-Kubu (17 October 905), Mantyasih (11 April 907), Rukam (907), Wanua Tengah III (908) and Watu Ridang (910) inscriptions. Our current knowledge of the names of kings that ruled the Mataram kingdom in the 8th and 9th centuries owes much to the Mantyasih inscription (907) and the Wanua Tengah III inscription (908), both issued by Balitung. Both inscriptions include an ordered list of Mataram kings going as far as back as King Sanjaya (r. 716-746), though Wanua Tengah III contains more detail: it provides the dates on which each king came to power, and mentions several briefly-reigning kings who are omitted from Mantyasih (e.g. Gula, Tagwas, Dewendra and Bhadra). Contrary to popular belief, neither Mantyasih nor Wanua Tengah III contains a genealogy of Balitung's predecessors, as they give no explanation of the family relationships between any of the kings listed. Balitung's motivations in producing these two edicts has elicited various hypotheses from historians, with some suggesting that he came to the throne in an irregular fashion and was therefore seeking legitimacy of his rule by calling upon his illustrious precursors. It is possible that he shared common ancestry with the kings mentioned in his inscription, as well as with his successors. However, no primary source gives us any explicit information about Balitung's position in the Mataram royal dynasty, so all theories about his familiar relations to earlier and later kings are purely hypothetical.

Several Hindu temples are estimated being built in later Mataram Kingdom period circa 10th century. They are Ijo, Kimpulan, Morangan and Merak temple. Barong and Ijo temples in particular are interesting, for they are built on the hill and has different layout compared to earlier temples. Sewu and Prambanan temples are arranged in concentric mandala layout. Barong and Ijo temples, however, are arranged in a completely different way; the main temple is located further back of the compound on the most higher ground, while the perwara complementary temples are built in front of the main temple on the lower ground, the layout corresponds to the uneven topography of the site. This style of temple layout is most likely the predecessor and will be continued in the later East Javanese temple architecture.

Balitung enacted several major reforms to the administration of the Mataram kingdom. On 12 November 904, he declared that all Buddhist monasteries (vihāra) in Java would henceforth be autonomous and free from taxation. On 15 October 905, Balitung moved into a new palace having come from Nyu Gading; two days later, the Kubu-kubu inscription emphasised that he was now established in that new palace, whose exact location is not known. The historian Wisseman Christie (2001) argued that 'Mataram achieved during his reign a higher degree of political stability and integration than it had enjoyed for some time'. Balitung's successor was Daksha (r. c. 910–c. 919), who ruled over the central and the eastern portions of Java. The transition of power between Balitung and Daksha between 910 and 913 is somewhat obscure and may have been irregular. Throughout the reign of Balitung, Daksha held the highest position as prime minister (mahāmantri) as well as the special title of the 'king's companion' (rowang haji, in the Kubu-Kubu inscription). During this time, Daksha issued a considerable number of charters on his own authority that only minimally acknowledged Balitung's supremacy. The Taji Gunung inscription (dated 21 December 910) mentions the designation of Taji Gunung village as a tax-exempt zone (sīma) by a prime minister whose identity is not clearly stated, but is believed to refer to Daksha. In this inscription, Balitung is mentioned in the same context as the long-deceased king Sanjaya, but it is not clear whether Balitung himself is still alive at this time. Although the kingdom also enjoyed relative peace and prosperity after the reign of Balitung, it seems that the construction of grand temples decreased in both quality and quantity.

King Daksha and his successors King Tulodong (r. 919–924) and Wagiswara (r. ca. 927) also ruled from Poh Pitu. The next monarch, King Wawa (r. 924–929) returned the capital back from Poh Pitu to Mataram. The Sangguran inscription (dated 2 August 928)—found in Malang area in East Java is particularly interesting, since it mentions the deed of Sri Maharaja Rakai Pangkaja Dyah Wawa Sri Wijayalokanamottungga (King Wawa) that granted the privileged status to the land in and around the source of Brantas river in present-day Batu and Malang area. This means that during the reign of Wawa, the kingdom has expanded eastward by establishing settlements along the river Bengawan Solo and Brantas.

Overseas invasions
In 767, Tonkin coast was hit by Java (Daba) and Kunlun raids,  around modern day Hanoi the capital of Tonkin (Annam). Around Son-tay they were vanquished at the hands of Chang Po-i the governor, after the 'K'un-lun po' and Java (Shepo) assaulted Tongking in 767.

Champa was subsequently assaulted by Javanese or K'un-lun po vessels in 774 and 787. In 774 an assault was launched on Po-Nagar in Nha-trang where the pirates demolished temples, while in 787 an assault was launched on Phang-rang. Several Champa coastal cities suffered naval raids and assault from Java. Java armadas was called as Javabala-sanghair-nāvāgataiḥ (fleets from Java) which are recorded in Champa epigraphs. All of these raids believed was launched by the Sailendras, ruler of Java and Srivijaya. The possible cause of Javanese assault on Champa was probably prompted by commerce rivalry on serving Chinese market. The 787 epigraph was in Yang Tikuh while the 774 epigraph was Po-nagar.

In Kauthara province in 774, Champa's Siva-linga temple of Po Nagar was assaulted and demolished. Champa source mentioned their invader as foreigners, sea-farers, eaters of inferior food, of frightful appearance, extraordinarily black and thin. The 774 assault by the Javanese happened in the rule of Isvaraloka (Satyavarman). Cham record mentioned that their country was hit by ferocious, pitiless, dark-skinned sea raiders, which modern historians believed to by Javanese. Java had commercial and cultural links to Champa. And assault was initiated on Cambodia. Javanese raid was launched via the Pulo Condor island. Malaya, Sumatra or Java all could have been the origin of the assaulters. The Kauthara Nha Trang temple of Po Nagar was ruined when ''ferocious, pitiless, dark-skinned men born in other countries, whose food was more horrible than corpses, and who were vicious and furious, came in ships. . . took away the [temple linga], and set fire to the temple''. In 774 according to the Nha Trang epigraph in Sanskrit by the Chams. Men born in other lands, living on other foods, frightful to look at, unnaturally dark and lean, cruel as death, passing over the sea in ships assaulted in 774.

In 787, warriors from Java borne over in ships assaulted Champa. In Phan-rang the Sri Bhadradhipatlsvara temple was arsoned by seaborne Java troops in 787, when Indravarman was in power at the hands of the Javanese. It was mentioned the armies of Java, having come in vessels of the 787 assault, and of the previous assault, that Satyavarman, the King of Champa vanquished them as they were followed by good ships and beaten at sea and they were men living on food more horrible than cadavers, frightful, completely black and gaunt, dreadful and evil as death, came in ships in the Nha-trang Po Nagar epigraph in Sanskrit, which called them men born in other countries. The ruin of the temple at Panduranga in 787 came at the hands of the assaulters.

Champa was an important commerce link between China and Srivijaya. The Majapahit and their predecessors the Javanese Mataram had ties with Champa. Further Cham diplomatic relations with Java occurred in 908 and 911 during the reign of Bhadravarman II (r. 905–917), which the king sent two envoys to the island. The 10th century Arab account Ajayeb al-Hind (Marvels of India) gives an account of invasion in Africa by people called Wakwak or Waqwaq, probably the Malay people of Srivijaya or Javanese people of Mataram kingdom,   in 945–946 CE. They arrived in the coast of Tanganyika and Mozambique with 1000 boats and attempted to take the citadel of Qanbaloh, though eventually failed. The reason of the attack is because that place had goods suitable for their country and for China, such as ivory, tortoise shells, panther skins, and ambergris, and also because they wanted black slaves from Bantu people (called Zeng or Zenj by Arabs, Jenggi by Javanese) who were strong and make good slaves. The existence of black Africans was recorded until the 15th century in Old Javanese inscriptions and the Javanese were still recorded as exporting black slaves during the Ming dynasty era. According to Waharu IV inscription (931 AD) and Garaman inscription (1053 AD), the Mataram kingdom and Airlangga's era Kahuripan kingdom (1000–1049 AD) of Java experienced a long prosperity so that it needed a lot of manpower, especially to bring crops, packings, and send them to ports. Black labour was imported from Jenggi (Zanzibar), Pujut (Australia), and Bondan (Papua). According to Naerssen, they arrived in Java by trading (bought by merchants) or being taken prisoner during a war and then made slaves.

Research in 2016 showed that the Malagasy people have genetic links to various Maritime Southeast Asian ethnic groups, particularly from southern Borneo. Parts of the Malagasy language are sourced from the Ma'anyan language with loan words from Sanskrit, with all the local linguistic modifications via Javanese or Malay language. The Ma'anyan and Dayak people are not a sailor and were dry-rice cultivators while some Malagasy are wet rice farmers, so it is likely that they are carried by the Javanese and Malay people in their trading fleets, as labour or slaves. Javanese trading and slaving activities in Africa caused a strong influence on boatbuilding on Madagascar and the East African coast. This is indicated by the existence of outriggers and oculi (eye ornament) on African boats. The Malagasy title "andriana" probably originated from the ancient Java-Indonesian nobility title Rahadyan (Ra-hady-an), "hady" meaning "Lord" or "Master."

Moving eastward
Around the year 929, the centre of the kingdom was shifted from Central Java to East Java by Mpu Sindok, who established the Isyana dynasty. The exact cause of the move is still uncertain. Historians have proposed various possible causes; from natural disaster, epidemic outbreak, politics and power struggle, to religious or economic motives.

According to van Bemmelen's theory, which was supported by Prof. Boechari a severe eruption of Mount Merapi volcano probably has caused the move. Historians suggest that, some time during the reign of King Wawa of Mataram (924–929), Merapi volcano erupted and devastated the kingdom's capital in Mataram. The historic massive volcano eruption is popularly known as Pralaya Mataram (the debacle of Mataram). The evidence for this eruption can be seen in several temples that were virtually buried under Merapi's lahar and volcanic debris, such as the Sambisari, Morangan, Kedulan, Kadisoka and Kimpulan temples.

Archeologist Agus Aris Munandar proposed a hypothesis, that the move was caused by a religious motives. He mentions that the incessant eruptions of Mount Merapi has caused the kingdom to move. Pointing out that in ancient Javanese beliefs, Merapi was considered as the Mahameru for the people in the ancient Mataram. According to Hindu teachings, the Mahameru peak symbolises the centre of the universe, the sacred realm where the gods live. Since their Mahameru in Central Java continued to erupt, they decided to move, but they still looked for another Mahameru. As East Java was still part of Mataram territory, it is possible that some of the people informed the Central Java kingdom that there was another Mahameru in the east. He suggests that the new sacred mountain was Mount Penanggungan in East Java, which resembles Mahameru.

Another hypothesis proposed by N.J. Krom says that the demise was caused by an epidemic break-out, forcing people to seek a new place to live. On the other hand, B. Schrieke says the move was caused by economic reasons; the vigorous temple construction boom during the era of Shailendran kings has put a tremendous economic burden upon the peasant. People were suffering as they were forced to build grand temples by the kings, instead of working their farms. Slowly they moved to the east to avoid the kings' orders.

A power struggle is also proposed as the cause of the move. Coedes suggested that the move to East Java was probably in response to the Buddhist Shailendra dynasty. This theory is inline with the one proposed by J.G. de Casparis which suggests, that the shift of capital city eastward was to avoid a Srivijaya invasion from Sumatra.

However, it was most likely motivated by economic reasons. De Casparis then expands his theory, saying that the location of the kingdom in Central Java was less accessible than East Java. The Brantas river valley was considered to be a strategic location, as the river provides easy access to reach ports on East Java's north coast and Java Sea, strategic for the control of maritime trade routes to the eastern parts of archipelago, being especially vital for control of the Maluku spice trade. This is in contrast with Mataram's Kedu and Kewu Plain that relatively isolated from the north coast of Central Java. Despite its fertility, ideal for rice agricultural kingdom, the Mataram Plain is quite isolated, its northern borders are protected by natural barrier of Merapi, Merbabu, Sumbing, Sundoro, Dieng and Ungaran volcanoes. Ideal for inward-looking agricultural polity, but insufficient to develop a maritime trading kingdom. The recent studies suggest, that the move eastward was not an abrupt event. During the Mataram period in Central Java, the kingdom most likely already expanded eastward and established settlements along Brantas river in East Java. It was more likely that the move was done in gradual manner over long period. The cause of the move was also motivated from multiple factors; either natural, economy or politics. The Sanggurah inscription or popularly known as the "Minto Stone", dated to 982—found in Malang, East Java in early 19th century—mentions the name of a Javanese king, Sri Maharaja Rakai Pangkaja Dyah Wawa Sri Wijayalokanamottungga (King Wawa Wijayaloka), who then ruled the Malang area. This suggests that even during the reign of King Wawa, the Malang region in East Java already belongs within the realm of Mataram Kingdom. The inscription contains elements about the shift of power that consequently took place to East Java.

Whatever the true reasons behind the move of political centre from Central to East Java, this event marked the end of an era profoundly. Indeed, the temple-building activity has decreased since the era of King Balitung in scale, quality and quantity, and yet the Eastern Java period of Mataram kingdom leave no tangible traces of any temple structure comparable to those of the previous Central Javanese Sailendra era. It seems that the kingdom no longer has the intention and the resource to embark on a grand scale construction project.

Establishing the eastern country
According to Turyan inscription (dated 929), Sindok moved the capital to Tamwlang and later moved it again to Watugaluh. Historians identify those names with the Tambelang and Megaluh area near modern Jombang, East Java. Although Sindok establishes a new dynasty, the Isyana dynasty named after his daughter, Sindok seems to be closely related to the royal house of Mataram, thus he can be viewed as the continuation of a long line of Javanese Kings lineage stretched from King Sanjaya. During his reign Sindok created quite a number of inscriptions, most are related to the establishment of Sima lands; these inscriptions are among others; Linggasutan (929), Gulung-Gulung (929), Cunggrang (929), Jru-Jru (930), Waharu (931), Sumbut (931), Wulig (935), and Anjukladang (937). Most of these inscriptions mentioned the establishment of Sima or Swatantra lands. This signifies that Sindok seems to consolidate his authority over East Java as collections of villages are declared as Sima lands, which means the settlements have developed wet rice cultivation and can be taxed and swore allegiance as part of Sindok's kingdom.

The Anjukladang inscription dated from 937, in particular, is interesting because it stated the Sima status is awarded to Anjukladang village and a temple is erected in recognition of their service in repelling the invading forces from Malayu. The temple mentioned here is probably the Candi Lor made of bricks which is now in ruins, located in Candirejo village in Nganjuk Regency. The mentioning of invading Malayu forces refer to the old name of Sumatran Malayu Kingdom, which probably means Srivijaya instead. This means the relations between East Javanese Mataram kingdom with Srivijaya has badly deteriorated to the state of hostility.

Expansion to Bali
Sindok was succeeded by his daughter Isyana Tunggawijaya. According to Gedangan inscription (dated 950), Queen Isyana married to Sri Lokapala, a nobleman from Bali. She later succeeded by her son Makutawangsa Wardhana c. 985. According to Pucangan inscription (dated 1041), King Makutawangsa Wardhana has a daughter named Mahendradatta, Makutawangsa Wardhana was replaced by his son Dharmawangsa Tguh c. 990s.

A later king, Dharmawangsa, moved the capital again to Wwatan, identified as the Wotan area near modern Madiun. Dharmawangsa's sister, Mahendradatta later would be betrothed to a Balinese king Udayana Warmadewa. This report indicated that somehow Bali had been absorbed into the Mataram Kingdom's mandala sphere of influence, probably as vassal. In literature development, King Dharmawangsa also ordered the translation of the Mahabharata into Old Javanese in 996.

Collapse
In the late 10th century, the rivalry between the Sumatran Srivijaya and Javanese Mataram became more hostile. The animosity was probably caused by the Srivijayan effort to reclaim Sailendra lands in Java, as Balaputra and his offspring—a new dynasty of Srivijaya maharajas—belonged to the Sailendra dynasty, or by Mataram aspirations to challenge Srivijaya dominance as the regional power. Previously the Anjukladang inscription dated from 937 mentioned about infiltration attack from Malayu which refer to a Srivijayan attack.

War against Srivijaya
In 990, Dharmawangsa launched a naval invasion against Srivijaya in an attempt to capture Palembang. The news of Javanese invasion of Srivijaya was recorded in Chinese accounts from Song period. In 988, an envoy from San-fo-qi (Srivijaya) was sent to Chinese court in Guangzhou. After sojourned for about two years in China, the envoy learned that his country has been attacked by She-po (Java) thus made him unable to return home.

The hostility between Srivijaya and Java was confirmed by the Javanese envoy. In 992 the envoy from She-po (Java) arrived in Chinese court and explaining that their country has involved in continuous war with Srivijaya. According to Chinese account, on the 12th month of 992, king Mu-lo-ch'a from She-po sent three envoys named T'o-Chan, P'u A-Li, and Li-t'o-na-chia-teng that bear a lot of gifts, consists of ivory, pearls, silk woven with floral motifs made of gold threads, silk of various colours, fragrant sandalwood, cotton clothes of various colours, turtle shells, betel nut preparation kit, kris dagger with exquisite hilt made of rhino horn and gold, rattan mat with the image of white cockatoo, and a small model of house made of sandalwood adorned with valuable ornaments.

In 992 the Srivijayan envoy sailed from China to Champa in an attempt to return home, however he received no news about the condition of his country. The Srivijayan envoy then sailed back to China and appealed Chinese Emperor for the protection of China against Javanese invaders.

Dharmawangsa's invasion led the Maharaja of Srivijaya, Sri Cudamani Warmadewa to seek protection from China. Srivijayan Maharaja, Sri Cudamani Warmadewa was an able and astute ruler, with shrewd diplomatic skills. In the midst of crisis brought by Javanese invasion, he secured Chinese political support by appeasing the Chinese Emperor. In 1003, a Song historical record reported that the envoy of San-fo-qi dispatched by the king Sri Cudamani Warmadewa, informed that a Buddhist temple had been erected in their country to pray for the long life of Chinese Emperor, thus asked the emperor to give the name and the bell for this temple which was built in his honour. Rejoiced, the Chinese Emperor named the temple Ch'eng-t'en-wan-shou ('ten thousand years of receiving blessing from heaven, which is China) and a bell was immediately cast and sent to Srivijaya to be installed in the temple.

Dharmawangsa campaign against Srivijaya in 990's ultimately did not have much effect on Srivijaya's sovereignty. Srivijaya successfully repel the invasion and regain control of their kingdom possibly since 1003, since that year Srivijaya has sent number of envoys to Chinese court regularly until 1178.

Mahapralaya
Pucangan inscription describe in 1016–1017, Haji (king) Wurawari to revolt. He launched an invasion from Lwaram, attacked and destroyed the Mataram Palace, killing Dharmawangsa and most of the royal family. Wurawari was a vassal polity located in present-day Banyumas area, south of Karang Kobar. Lwaram is connected to the modern-day Ngloram village in Cepu region, Blora, Central Java. This sudden and unexpected attack took place during the wedding ceremony of Dharmawangsa's daughter, which rendered the court unprepared and shocked.

This calamity was recorded in Javanese account as the pralaya (the debacle) the death of the Mataram kingdom. With the death of Dharmawangsa and the fall of the capital, under military pressure from Wurawari, the kingdom finally collapsed and fell to chaos. With the absence of Mataram paramount ruler, warlords in regional provinces and settlements in central and east Java rebelled and break loose from the central Mataram government and forming their own polities serving local dynasties. Raids and robbery were rampant ravaging the country. There was further unrest and violence several years after the kingdom's demise. Airlangga, a son of King Udayana Warmadewa of Bali and Queen Mahendradatta, also a nephew of slain King Dharmawangsa, managed to escape the destruction and went into exile in Vanagiri forest in interior Central Java. He later rallied popular support, reunited the remnants of the Mataram Kingdom and re-established the kingdom (including Bali) under the name of Kingdom of Kahuripan in 1019. The Kingdom of Kahuripan can be considered as the successor state of Mataram Kingdom, and from this point on, the kingdom was known as Kahuripan, with its capital located near Brantas river estuarine, somewhere around modern Surabaya, Sidoarjo or Pasuruan in East Java.

The dual dynasties theory
Bosch in his book "Srivijaya, de Sailendravamsa en de Sanjayavamsa" (1952) suggested that king Sanjaya was the progenitor of the Sanjaya dynasty, and there were two dynasties that ruled Central Java; the Buddhist Shailendra and the Shaivist Sanjaya dynasty. The inscription also states that Sanjaya was an ardent follower of Shaivism. From its founding in the early 8th century until 928, the kingdom was ruled by the Sanjaya dynasty. The first king was Sanjaya, who ruled in the Mataram region in the vicinity of modern Yogyakarta and Prambanan, and left the written records on the Canggal inscription. However, around the mid 8th century, the Shailendra dynasty emerged in Central Java and challenged Sanjaya domination in the region.

The prevailing historical interpretation holds that the Shailendra dynasty co-existed next to the Sanjaya dynasty in Central Java, and much of the period was characterised by peaceful co-operation. The Shailendra, with their strong connections to Srivijaya, managed to gain control of Central Java and become overlords of the Rakai (local Javanese lords), including the Sanjayas, thus making the Sanjaya kings of Mataram their vassals. Little is known about the kingdom due to the dominance of the Shailendra, who during this period constructed Borobudur, a Buddhist monument. Samaratungga, the monarch of the Shailendra, tried to secure the Shailendra position in Java, cementing an alliance with the Sanjayas by arranging the marriage of his daughter Pramodhawardhani with Pikatan.

Around the middle of the 9th century, relations between the Sanjaya and the Shailendra deteriorated. In 852, the Sanjaya ruler, Pikatan, defeated Balaputra, the offspring of the Shailendra monarch Samaratunga and the princess Tara. This ended the Shailendra presence in Java; Balaputra retreated to the Srivijayan capital in Sumatra, where he became the paramount ruler. The victory of Pikatan was recorded in Shivagrha inscription dated 856, created by Rakai Kayuwangi, Pikatan's successor.

The single dynasty theory

However, this dual Shailendra—Sanjaya dynasties theory proposed by Bosch and De Casparis was opposed by some Indonesian historians in later period. An alternate theory, proposed by Poerbatjaraka, suggests there was only one kingdom and one dynasty, the kingdom called Mataram, and the ruling dynasty being the Shailendra dynasty.

This theory is supported with Boechari interpretation on Sojomerto inscription and Poerbatjaraka study on Carita Parahyangan manuscript, Poerbatjaraka holds that Sanjaya and all of his offspring belongs to the Sailendra family, which initially was Shavite Hindu. However, according to Raja Sankhara inscription (now missing); Sanjaya's son, Panangkaran, converted to Mahāyāna Buddhism. And because of that conversion, the later series of Sailendra kings who ruled Mataram become Mahāyāna Buddhists also and gave Buddhism royal patronage in Java until the end of Samaratungga's reign. The Shaivite Hindus regained royal patronage with the reign of Pikatan, which lasted until the end of the Mataram Kingdom. During the reign of Kings Pikatan and Balitung, the royal Hindu Trimurti temple of Prambanan was built and expanded in the vicinity of Yogyakarta.

Government and economy
The complex stratified ancient Javan society, with its refined aesthetic taste in art and culture, is evidenced through the various scenes in narrative bas-reliefs carved on various temples dated from the Mataram era.

Capital
During this period the common concept of city, as it known in Europe, Middle East or China, as the urban concentration centre of politics, administration, religious and economic activities, was not quite established yet in ancient Java. The proper urban development as a city took place later in 13th-century Majapahit's Trowulan.

The capital itself is more likely refer to the palace, a walled compound called pura in Sanskrit, or in local Javanese as karaton or kadatwan, this is where the king and his family reside and rule his court. The palace itself is more of a collection of pendopo style pavilions surrounded by walls. These pavilions and halls are made from organic wooden and thatched materials, so they had decayed over centuries leaving only stone walls, gates, terraces and bases. The example of this type of secular buildings can be found in Ratu Boko compound. The Javanese urban centre in this period did not recognise walled-city as it found in Chinese or Indian counterparts, the only walled, well-guarded and protected compound was the king's palace and temple compound. The nagara or capital itself was more of a collection of densely populated villages surrounding the pura (king's palace). The religious activity centres, which refer to the location of where the temples stood, did not necessarily signify the administrative or economic centre as well. As according to inscriptions, numbers of lands has been awarded a Sima status with portion or the whole of its rice tax revenue was allocated to funding the construction and maintaining the temple. Nevertheless, it is quite possible that the Prambanan Plain with high concentration of temples located just few hundred metres away from each other—Sambisari, Kalasan, Sari, Sewu, Lumbung, Prambanan, Plaosan, Sajiwan, Banyunibo, Ratuboko, Barong and Ijo temples—might be the location of the capital of Mataram. Other experts argued that the Prambanan area was indeed the religious centre of the kingdom, but was not the administrative centre, while suggesting other locations in Muntilan as the possible political centre of the kingdom.

Most of the time, the court of the Mataram Kingdom was located in Mataram, possibly located somewhere in Muntilan or the Prambanan Plain near modern Yogyakarta. However, during the reign of Rakai Pikatan, the court was moved to Mamrati. Later, in the reign of Balitung, the court moved again, this time to Poh Pitu. Unlike Mataram, historians have been unable to pinpoint the possible locations of Mamrati and Poh Pitu, although most historians agree that both were located in the Kedu Plain, somewhere around the modern Magelang or Temanggung regencies. Later expert suggests that the area in Secang, on the upper Progo river valley in northern Magelang Regency—with relatively high temple density—was possibly the secondary political centre of the kingdom. In later Eastern Java period, other centres were mentioned; such as Tamwlang and Watugaluh (near Jombang), also Wwatan (near Madiun).

Administration
During this period the administration level of Javanese polity was only consists of two levels; the central government level centred in king's court, and the wanua or village level took form of settlements scattered around within kingdom's realm. The palace where the King resided was mentioned as kadatwan or karaton, the court was the centre of kingdom's administration. The wanua or village is more likely took shape of an "island" filled with housings and orchards in the middle of vast rice paddies, this village layout still can be found in modern Javanese desa.

The King was regarded as the paramount ruler or chakravartin, where the highest power and authority lies. He ruled the nagara or kadatwan which means the kingdom, from his puri (palace or walled compound). Under the king, there are state officials that serve to forward the king's laws and orders. They are using the title of Rakai or Samget. The Rakais ruled an administrative unit called watak that formed from the collection of several villages or wanua. Rakai can be considered as regional landlord or the landed gentry, that rule a large collection of villages. The Rakais transmit the king's order to the Rama or village leaders that rules their own domain called karaman or watak. As the kingdom grew larger and complex, entering the 10th century during the reign of Balitung, series of state officials are added to add hierarchy levels.

Most of the inscriptions dated from Mataram period are related to the establishment of sima lands. This signify the formation and expansion of Javanese agricultural villages in the region during this period. Either by opening a forest or converting a ladang (dry rice cultivation) to sawah (wet rice cultivation). A sima is an arable wet rice agricultural land with rice surpluses available for taxation, and officially recognised through royal edict. Most of these sima lands are ruled by regional rakai or  (landed gentry) in their realm. By acquiring prestigious sima status from the king, a watak regional unit held a higher prestige compared to non-sima settlements, yet this also means acknowledging the kingdom's overlordship over their land and swore their allegiance to the king. The Rakais that rule the land are granted a royal permission to collect tax, yet some parts of these tax should be regularly paid to the king's court (central government in the capital). In some instance, some of these sima inscription stated that this sima land has become a tax-free land, in exchange that the rice harvest surpluses collected from this land are used to construct or maintain a religious building. This means the rakai that traditionally ruled this lands no longer has the right to collect the tax, or at least reducing their tax earnings.

Other than their administrative and military-defense function, the king and the royal family is also known as the patron of arts and also religious piousness. The king, the royal family and the kingdom's officials had the authority to launch public projects, such as irrigation works or temple construction. The royal art and religious patronage can be seen in sponsoring temples constructions. The kingdom left behind several temples and monuments. The most notable ones are Borobudur, Prambanan, Sewu, and the Plaosan temple compound.

Economy
The common people of mostly made a living in agriculture, especially as rice farmers, however, some may have pursued other careers, such as hunter, trader, artisan, weaponsmith, sailor, soldier, dancer, musician, food or drink vendor, etc. Rich portrayals of daily life in 9th century Java can be seen in many temple bas-reliefs. Rice cultivation had become the base for the kingdom's economy where the villages throughout the realm relied on their annual rice yield to pay taxes to the court. Exploiting the fertile volcanic soil of Central Java and the intensive wet rice cultivation (sawah) enabled the population to grow significantly, which contributed to the availability of labour and workforce for the state's public projects. Certain villages and lands were given the status as sima lands awarded through royal edict written in inscriptions. The rice yields from sima lands usually were allocated for the maintenance of certain religious buildings.

The economic activity was also not solely centred in a single marketplace in the capital city. It is most likely that the marketplace was rotated in daily basis within a week among participating villages, in a Javanese system called pasaran. This system still can be found in rural Javanese villages, before most are turned into a permanent marketplace as it is commonly found today. The economic trading practice in these marketplace are most likely done in barter as well as using money, as during this period, Javanese economy has been partly monetised.

The bas-reliefs from temples of this period, especially from Borobudur and Prambanan describe occupations and careers other than agricultural pursuit; such as soldiers, government officials, court servants, massage therapists, travelling musicians and dancing troupe, food and drink sellers, logistics courier, sailors, merchants, even thugs and robbers are depicted in everyday life of 9th century Java. These occupations requires economic system that employs currency. The Wonoboyo hoard, golden artefacts discovered in 1990, revealed gold coins in shape similar to corn seeds, which suggests that 9th century Javan economy is partly monetised. On the surface of the gold coins engraved with a script "ta", a short form of "tail" or "tahil" a unit of currency in ancient Java.

Society
A complex and stratified society of ancient Javanese people and their social order can be seen through studies on the rich portrayal in bas-reliefs from this period, as well as inscription studies. The kingdom had developed a complex society; which characterised by heterogeneity of their society, inequality of social stratification, and the formation of national administrative institution in their kingdom. The ancient Javanese did recognise the Hindu catur varna or caste social classes; Brahmana (priests), Kshatriya (kings, warlords and nobles), Vaishya (traders and artisans), and Shudra (servants and slaves). Nevertheless, the social stratification system in ancient Java slightly differ from those of India, as it is less rigid.

Pigeaud divides ancient Javanese society into four classes: the ruling class, religious authority, commoners, and slaves. While de Casparis suggest; although the ancient Javanese society recognise caste differences, their rules and implementations was less rigid compared to those caste system in India. De Casparis divides them into three groups:
 * 1) The commoners that formed the majority of kingdom's population.
 * 2) The king with his royal family, including those nobles, landlords and the member of elite ruling class that depends on the king's court and his dynasty. Can be commonly called "the palace/court people".
 * 3) The religious figures and religious authorities. The priests class; brahmins and monks, includes the lower rank servants employed in temple compounds and monasteries.

Based on the study of the styles and types of clothing and jewelries worn by people depicted in bas-reliefs from the temple—especially Borobudur reliefs—the ancient Javanese society roughly can be divided into:
 * 1) The nobles, the king and the royal families, landlords, nobles and those that related to ruling elites. They wore luxurious clothing of kain long clothes wrapped around their hips to the ankle, waistband, and sash either wore around their hips as sampur, or wore around their body hanging from left shoulder to the hip. Adorned with intricate golden jewelries such as jamang (forehead ornaments), makuta (crown), earrings, kelat bahu (armlet), necklace, upavita (body ornament of golden chains wore across the chest), bracelets, rings, ankle bracelet. The gods and divinities also portrayed in similar fashion as nobles, although they are described as having prabhamandala (divine halo) around their head.
 * 2) The royal servants or lower-ranked nobles, they are king's servants, entourages or royal attendants. They occupied positions as dayang-dayang (female royal attendants), guard or state officials. They wore long cloth around their hips to the ankle, and wore jewelries and ornaments too, such as earrings, necklace and bracelets, although not as complete and luxurious as those worn by the king and the nobles.
 * 3) The priests, the brahmins, Buddhist monks, or those religious figures employed in temples or monasteries. They usually wore robes or cloaks called sinhel. Buddhist monks were usually portrayed as bald men wore robe with open right shoulder, while brahmins were usually depicted as bearded men wearing turbans.
 * 4) The commoners, the majority of the people, mostly described as villagers. They wore simple clothing of around their hips, the lower end sometimes being tied upward to create a short loincloth. Usually they wore no jewellery or ornaments, but some wore a few simple ornaments, including necklaces or bracelets, or a rope worn as a waistband.

Religion

Hinduism and Buddhism are the two religions adhered by the rulers and people of the kingdom. Nevertheless, the commoners' religious practices were probably still mixed with native shamanism and indigenous pre-Dharmic beliefs. Since the beginning of its formation, the Mataram kings seemed to favour Shaivite Hinduism, such as the construction of linga in Gunung Wukir Hindu temple as mentioned in Canggal inscription by king Sanjaya. However, during the reign of Panangkaran, Mahayana Buddhism began to blossomed and gain court favour. The Kalasan, Sari, Sewu, Mendut, Pawon and the magnificent Borobudur temples testify the Buddhist renaissance in Central Java. The court patronage on Buddhism spanned from the reign of Panangkaran to Samaratungga. During the reign of Pikatan, Shivaite Hinduism began to regain court's favour, signified by the construction of grand Shivagrha (Prambanan).

The kingdom recognised the religious authority of priest class, the brahmins. Buddhism was also well represented through the sangha Buddhist monastic community, consists of Buddhist monks living in viharas such as Sari and Plaosan and gaining court patronage. These Hindu and Buddhist religious authorities conducted state's and regional religious rituals and ceremonies in the temples. The ruling class of kshatriya royal family also indulged in spiritualism. Some monarch seems to immerse themselves in spiritualism and religion. For example, King Panangkaran seems to be deeply influenced by Mahayana Buddhism, and even strive to become a hermit during his later days. Numbers of other kings such as Samaragrawira and Samaratungga was also deeply influenced by Buddhism and strive to become a benevolent leaders. Rakai Pikatan also abdicated and renounced worldly affairs during his old days and become a rishi hermit named Sang Prabhu Jatiningrat.

The period between the reign of King Panangkaran to the reign of King Balitung (late 8th century to the early 10th century) saw a fervent temple construction in the kingdom. This was probably motivated either by religious zeal, kingdom's immense wealth and resources or social-political reasons. Some historians such as Munoz suggest, that this ardent temple construction projects was actually a religious-political tool to control the regional Rakai landlords, to prevent them from rebelling against the king. During this time, each of regional watak are ruled by Rakai landlords that nurturing their own dynasty. By appointing the Rakais' sima land to fund the construction and maintenance of a candi religious building, the Maharaja depriving the Rakais' ability to collect large sum of tax, that can be potentially misused to fund some army that might rose to challenge the Maharaja's authority. The Rakais might be willingly or reluctantly compliant to the king's will, for refusing to construct religious building might harm their reputation, and cast them not only as the enemy of the king, but also as the enemy of gods or Buddha.

Art and Architecture
The bas-reliefs and statuaries of the temples built during Mataram kingdom demonstrated a fine aesthetic quality of well proportioned anatomy, intricate details, superb sculpting technical workmanship, with distinct style of art, commonly identified in archaeological term as "Javanese art" or more precisely "Shailendra art". These sculptures are exquisite and are considered to be among the finest works of art in the Hindu-Buddhist world. The fine example of Javanese art bas-reliefs can be found as early in the 8th century on the walls of Kalasan and Sari temples. Masterpieces of Javanese Hindu-Buddhist art can be found in the sculptures of Sewu, Borobudur, Prambanan, and Plaosan temples. Prambanan and Borobudur in particular are considered as the pinnacle of Javanese Hindu-Buddhist art. Both monuments testify to Java's glorious past in its classical period. The temple panels show a sophisticated and elegant society of ancient Java. The Javanese Shailendra art is considered as one of the finest Buddhist art in the world.

Indeed, the Central Javanese art of the 8th to 9th century is localised, even though it ultimately derived from Indian art. It clearly developed independently during this period. The Central Javanese art of this period in return influenced the regional art in Southeast Asia, which mistakenly described as Srivijaya art found in Sumatra, Malay peninsula and Southern Thailand. For example Avalokiteshvara from Bingin Jungut in Musi Rawas, the bronze statue of Avalokiteshvara of Bidor discovered in Perak, Malaysia, and Avalokiteshvara of Chaiya in Southern Thailand, all demonstrate the Central Javanese or Sailendran art influence.

Other than examining bas-reliefs carved on the temple's walls, the study of ancient Javanese society is also conducted through archaeological relics. The Wonoboyo hoard golden artefacts attest to the wealth, art, and culture as well as the aesthetic achievement of the Mataram Kingdom. The artefacts show the intricate artwork and technical mastery of the ancient Javanese goldsmith. The hoard was estimated to date from the reign of King Balitung. The treasure has been identified as belonging to a noble or a member of the royal family.

The earliest temple in the Southern Central Java Mataram region was the Hindu Shivaist Gunung Wukir temple, linked to Canggal inscription (732 CE) built by King Sanjaya. Almost 50 years later the oldest Buddhist temple was built in Prambanan region, the Buddhist Kalasan temple, linked to Kalasan inscription (778 CE) and King Panangkaran. From this time, the kingdom saw exuberant temple construction projects, such as Sari, Manjusrigrha, Lumbung, Ngawen, Mendut, Pawon and peaked in the construction of Borobudur, the massive stone mandala, that took shape of a mountain temple pinnacled with stupas that completed c. 825 CE.

The monumental Hindu temple of Prambanan in the vicinity of Yogyakarta—initially built during the reign of King Pikatan (838–850), and expanded continuously through the reign of Lokapala (850–890) to Balitung (899–911)—is a fine example of ancient Mataram art and architecture. The description of a grand temple compound dedicated for lord Shiva, and the public project to shift the course of the river near the temple (Opak river) to run straight along western wall of temple compound was also mentioned in Shivagrha inscription. The grand temple complex was dedicated to the Trimurti, the three highest gods in the Hindu pantheon (Shiva, Brahma, Vishnu). It was the largest Hindu temple ever built in Indonesia, evidence of the immense wealth and cultural achievement of the kingdom.

Other Hindu temples dated from Mataram Kingdom era are: Sambisari, Gebang, Barong, Ijo, and Morangan. Although the Shaivites regain the favour, Buddhist remain under royal patronage. The Sewu temple dedicated for Manjusri according to Kelurak inscription was probably initially built by Panangkaran, but later expanded and completed during Rakai Pikatan's rule, whom married to a Buddhist princess Pramodhawardhani, daughter of Samaratungga. Most of their subjects retained their old religion; Shaivites and Buddhists seemed to co-exist in harmony. The Buddhist temple of Plaosan, Banyunibo and Sajiwan were built during the reign of King Pikatan and Queen Pramodhawardhani, probably in the spirit of religious reconciliation after the succession disputes between Pikatan-Pramodhawardhani against Balaputra.

Literature

From the 9th to mid 10th centuries, the Mataram Kingdom witnessed the blossoming of art, culture and literature, mainly through the translation of Hindu-Buddhist sacred texts and the transmission and adaptation of Hindu-Buddhist ideas into Old Javanese text and visual bas-reliefs rendering. The bas-relief carved on each sides of Mendut temple stairs and also on the base of Sojiwan temple for example, narrating the popular Jataka Buddhist tales, the stories that tell about the previous lives of the Buddha, in both human and animal form. The Borobudur bas-relief particularly, contains the most complete rendering of Buddhist sacred texts. Ranged from Karmavibhanga (the law of karma), Lalitavistara (the story of the Buddha), the tale of Manohara, Jataka and Jatakamala, Avadana (collection of virtuous deeds) and Gandavyuha (Sudhana's quest for the ultimate truth).

The bas-relief narration of the Hindu epic Ramayana and also was carved on the wall of Prambanan temple's Shiva and Brahma temples, while the stories of Krishna taken from Bhagavata Purana was carved on Vishnu temple. During this period, the Kakawin Ramayana, an old Javanese rendering was written. This Kakawin Ramayana, also called the Yogesvara Ramayana, is attributed to the scribe Yogesvara c. the 9th century CE, who was employed in the court of the Mataram in Central Java. It has 2774 stanzas in the manipravala style, a mixture of Sanskrit and archaic Javanese prose. The most influential version of the Ramayana is the Ravanavadham of Bhatti, popularly known as Bhattikavya. The Javanese Ramayana differs markedly from the original Hindu.

Relations with regional powers
Mataram kingdom had an exceptionally intense relations with the regional hegemon Srivijaya of Sumatra. In earlier period, the relations was close and intimate, as Shailendran kings of Java has formed an alliance with Maharaja of Srivijaya and the two royal houses seems to be merged. In later period however, the relations was deteriorated to warfare, as Dharmawangsa launched failed attempt to capture Palembang, and Srivijaya well-crafted retaliation ensued. In its eastern boundary, the Mataram kingdom seems to subjugate the neighbouring Bali, and pulled the island into its sphere of influence.

The Khmer art and architecture during the formative early Angkor era also believed to being influenced by Javanese art and architecture; the striking similarity of the Bakong temple in Cambodia to Borobudur, strongly suggests that Bakong was inspired by Borobudur's design. There must had been exchanges of travellers, if not mission, between Kambuja and Java. Transmitting to Cambodia not only ideas, but also technical and architectural details, including arched gateways in corbelling method.

The Kaladi inscription (c. 909 CE), mentioned Kmir (Khmer people of the Khmer Empire) together with Campa (Champa) and Rman (Mon) as foreigners from mainland Southeast Asia that frequently came to Java to trade. The inscription suggests a maritime trade network has been established between kingdoms in mainland Southeast Asia and Java.

The name of the Medang Kingdom was mentioned in the Laguna Copperplate Inscription of the Philippines' Tondo, dated 822 saka (c. 900 CE), discovered in Lumban, Laguna, Philippines. The discovery of the inscriptions, written in the Kawi script in a variety of Old Malay containing numerous loanwords from Sanskrit and a few non-Malay vocabulary elements whose origin is ambiguous between Old Javanese and Old Tagalog, suggests that the people or officials of the Mataram Kingdom had embarked on inter-insular trade and foreign relations in regions as far away as the Philippines, and that connections between ancient kingdoms in Indonesia and the Philippines existed.

Legacy

Celebrated as the golden age of ancient Indonesian civilisation—more precisely classic Javanese civilisation—the era of Mataram kingdom has left an everlasting mark and legacy in Indonesian culture and history; their monuments. The grand and magnificent Borobudur and Prambanan in particular, has become the source of national pride, not only for local Javanese but also for the whole of Indonesians. It is probably in the same fashion as how Khmer people of Cambodia took pride in their Angkorian legacy. These monuments today has become the nation's major attraction; Borobudur is the single most visited tourist attraction in Indonesia.

Never before—and again—that Indonesia saw such vigorous passion for development and temple construction, which demonstrate such technological mastery, labour and resource management, aesthetics and art refinement, also architectural achievement, other than this era. The period between the late 8th century to the late 9th century, between the reign of Panangkaran to Balitung, has left numbers of impressive religious monuments; among others are Manjusrigrha, Bhumisambharabudhara and Shivagrha.

The Mataram era is hailed as the classical period of Javanese civilisation; for during this period the Javanese culture, art and architecture was blossoming and developed further, consolidated and mixed their indigenous elements with dharmic influences. By incorporating Hindu-Buddhist frame of reference and elements into their culture, art and architecture, and by Sanskritization their language, Javanese has formulating their own Hindu-Buddhist Javanese style and developing an ingenious civilisation. This Javanese style of Sailendran art, either in sculpture and architecture, in return influenced regional arts, particularly the Srivijayan art in Sumatra and Southern Thailand Malay Peninsula.

It was also during this period that numbers of dharmic scriptures either Hindu or Buddhist, has made their way from India into Javanese culture. For example, the tales of Buddhist Jatakas and Lalitavistara, also Hindu epics Ramayana and Mahabharata were adopted into Javanese version. These tales and epics would further shaped the Javanese culture and performing arts, such as Javanese dances and wayang art.

In southern Thailand, existed traces of Javanese art and architecture (erroneously referred to as "Srivijayan"), which probably demonstrate the Sailendra influences over Java, Sumatra and the Peninsula. The examples are Phra Borom Mahathat at Chaiya constructed in Javanese style made of brick and mortar (c. 9th – 10th century), Wat Kaew Pagoda at Chaiya, also of Javanese form and Wat Long Pagoda. The original Wat Mahathat at Nakhon Si Thammarat was subsequently encased by a larger Sri Lanka styled building.

List of rulers
The ruler of Mataram Kingdom.

title: Mataram Kingdom


text:
Frobenius pseudoprime

In number theory, a Frobenius pseudoprime is a pseudoprime, whose definition was inspired by the quadratic Frobenius test described by Jon Grantham in a 1998 preprint and published in 2000. Frobenius pseudoprimes can be defined with respect to polynomials of degree at least 2, but they have been most extensively studied in the case of quadratic polynomials.

Frobenius pseudoprimes w.r.t. quadratic polynomials
The definition of Frobenius pseudoprimes with respect to a monic quadratic polynomial $$x^2 - Px + Q$$, where the discriminant $$D = P^2-4Q$$ is not a square, can be expressed in terms of Lucas sequences $$U_n(P,Q)$$ and $$V_n(P,Q)$$ as follows.

A composite number n is a Frobenius $$(P,Q)$$ pseudoprime if and only if
 * $$ (1) \qquad \gcd(n,2QD)=1,$$
 * $$ (2) \qquad U_{n-\delta}(P,Q) \equiv 0 \pmod n,$$ and
 * $$ (3) \qquad V_{n-\delta}(P,Q) \equiv 2Q^{(1-\delta)/2} \pmod{n},$$

where $$\delta=\left(\tfrac Dn\right)$$ is the Jacobi symbol.

When condition (2) is satisfied, condition (3) becomes equivalent to
 * $$ (3') \qquad V_n(P,Q) \equiv P\pmod{n}.$$

Therefore, a Frobenius $$(P,Q)$$ pseudoprime $n$ can be equivalently defined by conditions (1-2) and (3), or by conditions (1-2) and (3′).

Since conditions (2) and (3) hold for all primes which satisfy the simple condition (1), they can be used as a probable primality test. (If condition (1) fails, then either the greatest common divisor is less than $n$, in which case it is a non-trivial factor and $n$ is composite, or the GCD equals $n$, in which case one should try different parameters $P$ and $Q$ which are not multiples of $n$.)

Relations to other pseudoprimes
Every Frobenius $$(P,Q)$$ pseudoprime is also The converse of none of these statements is true, making the Frobenius $$(P,Q)$$ pseudoprimes a proper subset of each of the sets of Lucas pseudoprimes and Dickson pseudoprimes with parameters $$(P,Q)$$, and Fermat pseudoprimes to base $$|Q|$$ when $$|Q|>1$$. Furthermore, it follows that for the same parameters $$(P,Q)$$, a composite number is a Frobenius pseudoprime if and only if it is both a Lucas and Dickson pseudoprime. In other words, for every fixed pair of parameters $$(P,Q)$$, the set of Frobenius pseudoprimes equals the intersection of the sets of Lucas and Dickson pseudoprimes.
 * a Lucas pseudoprime with parameters $$(P,Q)$$, since it is defined by conditions (1) and (2);
 * a Dickson pseudoprime with parameters $$(P,Q)$$, since it is defined by conditions (1) and (3');
 * a Fermat pseudoprime base $$|Q|$$ when $$|Q|>1$$.

While each Frobenius $$(P,Q)$$ pseudoprime is a Lucas pseudoprime, it is not necessarily a strong Lucas pseudoprime. For example, 6721 is the first Frobenius pseudoprime for $$(P,Q) = (1,-1)$$, which is not a strong Lucas pseudoprime.

Every Frobenius pseudoprime to $$x^3-x-1$$ is also a restricted Perrin pseudoprime. Analogous statements hold for other cubic polynomials of the form $$x^3-rx^2+sx-1$$.

Examples
Frobenius pseudoprimes with respect to the Fibonacci polynomial $$x^2-x-1$$ are determined in terms of the Fibonacci numbers $$F_n = U_n(1,-1)$$ and Lucas numbers $$L_n = V_n(1,-1)$$. Such Frobenius pseudoprimes form the sequence:

 * 4181, 5777, 6721, 10877, 13201, 15251, 34561, 51841, 64079, 64681, 67861, 68251, 75077, 90061, 96049, 97921, 100127, 113573, 118441, 146611, 161027, 162133, 163081, 186961, 197209, 219781, 231703, 252601, 254321, 257761, 268801, 272611, 283361, 302101, 303101, 330929, 399001, 430127, 433621, 438751, 489601, ....

While 323 is the first Lucas pseudoprime with respect to the Fibonacci polynomial $$x^2-x-1$$, the first Frobenius pseudoprime with respect to the same polynomial is 4181 (Grantham stated it as 5777 but multiple authors have noted this is incorrect and is instead the first pseudoprime with $$\left(\tfrac{5}{n}\right)=-1$$ for this polynomial ).

Another case, Frobenius pseudoprimes with respect to the quadratic polynomial $$x^2-3x-1$$ can be determined using the Lucas $$(3,-1)$$ sequence and are:

 * 119, 649, 1189, 4187, 12871, 14041, 16109, 23479, 24769, 28421, 31631, 34997, 38503, 41441, 48577, 50545, 56279, 58081, 59081, 61447, 75077, 91187, 95761, 96139, 116821, 127937, 146329, 148943, 150281, 157693, 170039, 180517, 188501, 207761, 208349, 244649, 281017, 311579, 316409, 349441, 350173, 363091, 371399, 397927, 423721, 440833, 459191, 473801, 479119, 493697, ...

In this case, the first Frobenius pseudoprime with respect to the quadratic polynomial $$x^2-3x-1$$ is 119, which is also the first Lucas pseudoprime with respect to the same polynomial. Besides, $$\left(\tfrac{13}{119}\right)=-1$$.

The quadratic polynomial $$x^2-3x-5$$, i.e. $$(P,Q)=(3,-5)$$, has sparser pseudoprimes as compared to many other simple quadratics. Using the same process as above, we get the sequence:
 * 13333, 44801, 486157, 1615681, 3125281, 4219129, 9006401, 12589081, 13404751, 15576571, 16719781, ….

Notice there are only 3 such pseudoprimes below 500,000, while there are many Frobenius (1, −1) and (3, −1) pseudoprimes below 500,000.

Every entry in this sequence is a Fermat pseudoprime to base 5 as well as a Lucas (3, −5) pseudoprime, but the converse is not true: 642,001 is both a psp-5 and a Lucas (3,-5) pseudoprime, but is not a Frobenius (3, −5) pseudoprime. (Note that Lucas pseudoprime for a $(P, Q)$ pair need not to be a Fermat pseudoprime for base |$Q$|, e.g. 14209 is a Lucas (1, −3) pseudoprime, but not a Fermat pseudoprime for base 3.)

Strong Frobenius pseudoprimes
Strong Frobenius pseudoprimes are also defined. Details on implementation for quadratic polynomials can be found in Crandall and Pomerance.

By imposing the restrictions that $$\delta = -1$$ and $$Q \neq \pm1$$, the authors of show how to choose $$P$$ and $$Q$$ such that there are only five odd, composite numbers less than $$10^{15}$$ for which (3) holds, that is, for which $$V_{n+1} \equiv 2 Q \pmod {n} $$.

Pseudoprimality tests
The conditions defining Frobenius pseudoprime can be used for testing a given number n for probable primality. Often such tests do not rely on fixed parameters $$(P,Q)$$, but rather select them in a certain way depending on the input number n in order to decrease the proportion of false positives, i.e., composite numbers that pass the test. Sometimes such composite numbers are commonly called Frobenius pseudoprimes, although they may correspond to different parameters.

Using parameter selection ideas first laid out in Baillie and Wagstaff (1980) as part of the Baillie–PSW primality test and used by Grantham in his quadratic Frobenius test, one can create even better quadratic tests. In particular, it was shown that choosing parameters from quadratic non-residues modulo n (based on the Jacobi symbol) makes far stronger tests, and is one reason for the success of the Baillie–PSW primality test. For instance, for the parameters (P,2), where P is the first odd integer that satisfies $$\left(\tfrac{D}{n}\right) = -1$$, there are no pseudoprimes below 264.

Yet another test is proposed by Khashin. For a given non-square number n, it first computes a parameter c as the smallest odd prime having Jacobi symbol $$\left(\tfrac{c}{n}\right)=-1$$, and then verifies the congruence:
 * $$(1 + \sqrt{c})^n \equiv (1 - \sqrt{c}) \pmod n$$.

While all prime n pass this test, a composite n passes it if and only if n is a Frobenius pseudoprime for $$(P,Q)=(2,1-c)$$. Similar to the above example, Khashin notes that no pseudoprime has been found for his test. He further shows that any that exist under 260 must have a factor less than 19 or have c > 128.

Properties
The computational cost of the Frobenius pseudoprimality test with respect to quadratic polynomials is roughly three times the cost of a strong pseudoprimality test (i.e. a single round of the Miller–Rabin primality test), 1.5 times that of a Lucas pseudoprimality test, and slightly more than a Baillie–PSW primality test.

Note that the quadratic Frobenius test is stronger than the Lucas test. For example, 1763 is a Lucas pseudoprime to (P, Q) = (3, –1) since U1764(3,–1) ≡ 0 (mod 1763) (U(3,–1) is given in ), and it also passes the Jacobi step since $$\left(\tfrac{13}{1763}\right) = -1$$, but it fails the Frobenius test to x2 – 3x – 1. This property can be clearly seen when the algorithm is formulated as shown in Crandall and Pomerance Algorithm 3.6.9 or as shown by Loebenberger, as the algorithm does a Lucas test followed by an additional check for the Frobenius condition.

While the quadratic Frobenius test does not have formal error bounds beyond that of the Lucas test, it can be used as the basis for methods with much smaller error bounds. Note that these have more steps, additional requirements, and non-negligible additional computation beyond what is described on this page. It is important to note that the error bounds for these methods do not apply to the standard or strong Frobenius tests with fixed values of (P,Q) described on this page.

Based on this idea of pseudoprimes, algorithms with strong worst-case error bounds can be built. The quadratic Frobenius test, using a quadratic Frobenius test plus other conditions, has a bound of $$\tfrac{1}{7710}$$. Müller in 2001 proposed the MQFT test with bounds of essentially $$\tfrac{1}{131040^t}$$. Damgård and Frandsen in 2003 proposed the EQFT with a bound of essentially $$\tfrac{256}{{331776}^t}$$. Seysen in 2005 proposed the SQFT test with a bound of $$\tfrac{1}{{4096}^t}$$ and a SQFT3 test with a bound of $$\tfrac{16}{336442^t}$$.

Given the same computational effort, these offer better worst-case bounds than the commonly used Miller–Rabin primality test.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Frobenius pseudoprime


text:
User:Ligand

This is in construction!

title: User:Ligand


text:
Wikipedia:Articles for deletion/Southeast Raleigh Magnet High School

 This page is an archive of the proposed deletion of the article below. Further comments should be made on the appropriate discussion page (such as the article's talk page or on a Votes for Undeletion nomination). No further edits should be made to this page.

The result of the debate was KEEP: 13k, 4d (1 cow). -Splash 00:10, 23 July 2005 (UTC)

Southeast Raleigh Magnet High School
Not notable. - Ta bu shi da yu 14:41, 16 July 2005 (UTC)
 * Keep, see Schools/Arguments. Kappa 15:27, 16 July 2005 (UTC)
 * Keep. Spoon-billed Sandpiper. Pburka 16:28, 16 July 2005 (UTC)
 * Keep. Christopher Parham (talk) 16:37, 2005 July 16 (UTC)
 * Keep. Schools are notable. AdorableRuffian 17:03, 16 July 2005 (UTC)
 * Keep Nominating schools is now pointless, as I believe you know perfectly well. Please move on from this issue. CalJW 17:45, 16 July 2005 (UTC)
 * Keep, and I second CalJW's comment. JYolkowski // talk 17:48, 16 July 2005 (UTC)
 * Delete, even though this vote is probably useless. There are a gazillion of these too-new-to-tell schools starting up. Unless someone bothers to add something useful to the article, this one isn't worth keeping. -Aranel (" Sarah  ") 23:59, 16 July 2005 (UTC)
 * Comment -- I have not followed the school debate, and sincerely believe on my own terms that there is nothing inherently notable about Average Joe High School. That said, I was originally going to vote delete, but I do think magnet schools are inherently notable by their very nature. Therefore, I vote Keep, grudgingly. Haikupoet 03:34, 17 July 2005 (UTC)
 * Keep for the sake of ending school debates. Xoloz 04:00, 17 July 2005 (UTC)
 * Keep, non-notability not established. —RaD Man (talk) 19:45, 17 July 2005 (UTC)
 * Keep — If you want to "clean up" the various insignificant school articles, you could always just merge them into a school district article. — RJH 23:07, 17 July 2005 (UTC)
 * Keep by virtue of being a magnet school. It would really help if people put some effort into the first edit of school articles, however.  Dcarrano 00:06, July 18, 2005 (UTC)
 * Delete. Spam. Gamaliel 15:41, 18 July 2005 (UTC)
 * keep please why is this spam Yuckfoo 17:10, 18 July 2005 (UTC)
 * Cow. For the usual reasons. --Carnildo 20:19, 18 July 2005 (UTC)
 * Delete. It's just like every other school in the U.S. --Idont Havaname 22:56, 19 July 2005 (UTC)
 * Obvious keep. Nominator should be drawn and quartered. BLANKFAZE | (что??) 02:09, 20 July 2005 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made on the appropriate discussion page (such as the article's talk page or in an undeletion request). No further edits should be made to this page.